我是Davidson-Mckinnon-White规范测试,用于判断使用对数-对数模型或线性Box Cox模型的优越性。我在R上使用petest(),并且dit不断产生错误,但我找不到解决方法。 这是日志日志模型。变量已经是log()
chicago.log <- lm(data = chicago.dfbc, sprice ~ nrooms + lvarea + hage + lsize + ptaxes + sspend + mspend +medinc + dfcl + particle + sulfur +pctwht +dfni +aircon+ garage+ nbath + cook + ohare)
这是线性框模型。我已经修改了数据,所以我只能使用lm()运行。
chicagoboxcox.lin <- lm(data = chicago.dfbc ,sprice ~ nrooms+ lvarea+ hage+ lsize+ ptaxes+ sspend+ mspend+ medinc+ dfcl+ particle+ sulfur+pctwht+ dfni+ aircon+ garage+ nbath+ cook+ ohare)
所以我运行petest()并收到错误消息
> petest(chicago.log, chicagoboxcox.lin)
Error in petest(chicago.log, chicagoboxcox.lin) :
response in formula2 does not seem to specify the log or exp of the response in formula1
有解决方案吗? 预先感谢!