R中Voung检验的两个线性非嵌套模型的比较

时间:2015-03-03 09:26:54

标签: r testing comparison compare linear

我想比较两个线性非嵌套模型,例如

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

我该怎么办?

0 个答案:

没有答案