在R中进行Hausman Test时,参照了http://finzi.psych.upenn.edu/R/library/plm/html/phtest.html 链接中的方法,但是遇到如下两个提示。本人入门小白,向大家求教!
form<- lm(log(Z)~ GDP+SH1+Gov1+log(Board)+Indep+log(Comp)+log(MSH))
wi<-plm(form, data=grad, model="within")
Error: inherits(object, "formula") is not TRUE
后来参照别的帖子的教程修改之后出现了另一种错误提示:
form<- log(Z)~ GDP+SH1+Gov1+log(Board)+Indep+log(Comp)+log(MSH)
wi<-plm(form, data=grad, model="within")
Error in Math.factor(c(57L, 59L, 61L, 42L, 41L, 35L, 76L, 56L, 38L, 17L, :
‘log’ not meaningful for factors
向各位求教!