Error in plm function: 'names' attribute [343] must be the same length as the vector [0]
问题 I am running a panel regression using 'plm' function using the following code: test_reg=plm(y~x1+x2+x3+x4*x7+x5*x7+x6*x7+x8+x9+x10+x11,DATA, index = c("year","id"),model ="within") summary(test_reg) Then I get the following error: Error in names(y) <- namesy : 'names' attribute [343] must be the same length as the vector [0] However, when I switch the y variable and x10 variable and run the same 'plm' function again, I do not get such an error and it works well like: test_reg=plm(x10~x1+x2+x3