[R] Error: invalid type (closure) for the variable 'time' - object specific trend

Tobias Christoph s3tochri at uni-bayreuth.de
Thu May 11 22:20:05 CEST 2017


Hey Duncan,

thank you very much for your quick reply.

_My data used:_

1st column(town):1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,...........,11

2nd column(year):1,2,3,4,5,6,7,8,9,10,11,12,1,2,3.......,12

3rd column (revenue):

4th colum (supply):

I have now renamed my colums and did the regression again. Now there is 
a problem with R-squared, as it is the sum of 1 now with no given std. 
error and t-value. This is probably due to the fact, that I try to 
estimate more parameters than data.

To add a linear trend I found the following formular:*lm(y ~ x1 + 
factor(ccode)*time, data=df)*

I try to I decode it for and use it for my regression: *plm(log(revenue) 
~ log(supply) + factor(town)*time, data=R_Test_log_Neu)*

When I do this regression I will get the original error: "invalid type 
(closure) for the variable 'time' - object specific trend"

With the notation"time" not my colum is meant, but probably the command 
"time" in R.

Can you follow my thoughts?

Tobi






Am 11.05.2017 um 17:23 schrieb Duncan Murdoch:
> Duncan Murdoch



More information about the R-help mailing list