我想比较两个线性非嵌套模型,例如
data(longley)
attach(longley)
r1<-glm(GNP~Unemployed+Armed.Forces+Population, family=gaussian)
r2<-glm(GNP~Unemployed+Armed.Forces+Employed, family=gaussian)
但是我收到了这个错误:
vuong(r1, r2)
Error in vuong(r1, r2) :
your object of class glm is unsupported by predprob.glmyour object of class lm is unsupported by predprob.glm
我该怎么办?