嵌套模型(Nested Models)和非嵌套模型(Non-Nested Models) 的统计检验(R语言)

在R语言中,对于嵌套(nest)模型可以使用likelihood ratio tests(似然比检验),对于非嵌套模型(Non-Nested Models) 可以使用Davidson and MacKinnon’s J-test。这两种检验在论文中经常使用如:
在这里插入图片描述

如下为其代码示例:

require(lmtest)
## Fit two competing, non-nested models for aggregate 
## consumption, as in Greene (1993), Examples 7.11 and 7.12## load data and compute lags
data(USDistLag)
usdl <- na.contiguous(cbind(USDistLag, lag(USDistLag, k = -1)))
colnames(usdl) <- c("con", "gnp", "con1", "gnp1")## C(t) = a0 + a1*Y(t) + a2*C(t-1) + u
fm1 <- lm(con ~ gnp + con1, data = usdl)## C(t) = b0 + b1*Y(t) + b2*Y(t-1) + v
fm2 <- lm(con ~ gnp + gnp1, data = usdl)fm3 <- lm(con ~ gnp, data = usdl)
## Cox test in both directions:
coxtest(fm1, fm2)## ...and do the same for jtest() and encomptest().
## Notice that in this particular case they are coincident.
jtest(fm1, fm2)
encomptest(fm1, fm2)
# likelihood ratio tests
lrtest(fm3, fm1)

检验结果如下图所示:
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

参考

http://math.furman.edu/~dcs/courses/math47/R/library/lmtest/html/jtest.html
https://www.bauer.uh.edu/rsusmel/phd/ec1-6.pdf
http://www.empowerstats.com/cn/manuals/RCH/html/z_lrt.pdf


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部