On 11/05/2017 9:37 AM, Tobias Christoph wrote:
Hey,

I just have trouble adding a object specific time trend with the
plm-package. I recieve the following error:
*
**"Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs,
data = data,  : invalid type for the variable 'time' "*

I used the formula:

/ FE_trend<- plm(log(revenue) ~ log(supply)+ city*time,
data=R_Test_log_Neu, model="within", effect = "twoways") //
/
Do you have an idea how to fix it?

I don't know that package and you didn't supply a reproducible example, so there are at least these two possibilities:

1. Your dataframe R_Test_log_Neu contains no column named "time". (Remember that "Time" and "time" are different.) Fix: use the correct column name.

2. The plm package isn't doing lookup of symbols from the formula first in your dataframe. This would need to be fixed in the package. A workaround might be to name the columns with unique names that won't be found anywhere else, e.g. name your column "NeuTime" instead of "time".

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to