Request info for using plm()

Hi everyone.

I have a problem during executing the plm()

I tried to execute this syntax for panel data analysis to assess the fixed effect and random effect but seems fail. anybody can help?

Fixed effects or within estimator

fixed <- plm(Y ~ X, data=pdata, model= "within")

result

fixed <- plm(Y ~ X, data=pdata, 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)

Random effects estimator

random <- plm(Y ~ X, data=pdata, model= "random")

result

Random effects estimator

random <- plm(Y ~ X, data=pdata, model= "random")
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)

But there were no issues when I run the "pooling", "fd", and "between".

Please kindly advise

Thank you

Bagus

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.