Im trying to run this code but I have not been successful for a fixed-effect model in Rstudip.
this are my variables
y <- cbind(tfpch)
x <- cbind(EI, LP, INFA)
This is the code and the error
fixed<-plm(y~x,data = mydata,index = c("ID", "t"), model="within")
Error in class(x) <- setdiff(class(x), "pseries") :
invalid to set the class to matrix unless the dimension attribute is of length 2 (was 0)
The columns of my data are ID(name of the firm), t(year), EI(energy intensity -independent variable, LP(labour productivity - independent variable, INFA(Investment in fixed assets - independent variable, TFPCH (total factor of productivity change -dependent variable).
Im looking how to fix this issue but none of the solutions offered here the work so far.