【发布时间】:2022-01-05 05:45:57
【问题描述】:
我正在寻找一种方法来比较两个模型(我不太擅长 R 或统计)。两者之间的唯一区别是,一个具有固定效应,而另一个具有随机效应。让我知道你会做些什么来比较它们!
fixedmodel <- plm(mrateunder5 ~ GDPPPP, index = c("Year",
"Country"), model = "within", data = FinalData)
randommodel <- plm(mrateunder5 ~ GDPPPP, index = c("Year",
"Country"), model = "within", data = FinalData)
我将使用哪些测试来比较这两个模型?
我尝试过但不确定的事情:
BIC(lm(mrateunder5 ~1))
BIC(fixedmodel)
BIC(randommodel)
得到了
[1] 755.3131
[1] 694.2637
[1] 700.9067
BIC(fixedmodel)和BIC(randommodel)的区别还不够大,不能下结论哪个更有效,对吧?
我看到有人建议对每个人进行 Wald 测试,但我不确定如何解释结果。
这就是我所做的:
pwaldtest(fixedmodel, test = "Chisq")
pwaldtest(randommodel, test = "Chisq")
结果:
Wald test for joint significance
data: mrateunder5 ~ GDPPPP
Chisq = 67.795, df = 1, p-value < 2.2e-16
alternative hypothesis: at least one coefficient is not null
Wald test for joint significance
data: mrateunder5 ~ GDPPPP
Chisq = 71.103, df = 1, p-value < 2.2e-16
alternative hypothesis: at least one coefficient is not null
另外,我可以使用似然比检验来比较模型吗?我认为不是因为我认为 plm 是 OLS 而不是 MLE,但我不确定。
附言 随机效应模型的调整后 r 平方略高,但我的教授告诉我们调整后的 r 平方足以说明模型进行比较。
【问题讨论】:
标签: r panel-data plm