1

我想知道基于 AIC 和 BIC 值的最佳模型(m6)怎么可能有一个不重要的项,而第二好的模型(m5)有一个重要的项。

我有以下竞争模型列表:

m1=gls(Area_Km2~size+cent_Latitude+PCptail+pwingbilltar,corMartins(1,phy=ctree),data = c)
m2=gls(Area_Km2~size+cent_Latitude+PCptail,corMartins(1,phy=ctree),data = c)
m3=gls(Area_Km2~size+cent_Latitude,corMartins(1,phy=ctree),data = c)
m4=gls(Area_Km2~size,corMartins(1,phy=ctree),data = c)
m5=gls(Area_Km2~PCptail,corMartins(1,phy=ctree),data = c)
m6=gls(Area_Km2~cent_Latitude,corMartins(1,phy=ctree),data = c)
m7=gls(Area_Km2~pwingbilltar,corMartins(1,phy=ctree),data = c)

这是模型比较

   Model df      AIC      BIC    logLik   Test  L.Ratio p-value
m1     1  7 147.2775 157.9620 -66.63873                        
m2     2  6 139.4866 148.8187 -63.74331 1 vs 2 5.790838  0.0161
m3     3  5 133.3334 141.2510 -61.66672 2 vs 3 4.153191  0.0416
m4     4  4 130.7749 137.2186 -61.38746 3 vs 4 0.558517  0.4549
m5     5  4 127.0635 133.5072 -59.53175                        
m6     6  4 125.1006 131.5443 -58.55029                        
m7     7  4 132.4542 138.8979 -62.22711                        

这里是m6

 Generalized least squares fit by REML
  Model: Area_Km2 ~ cent_Latitude 
  Data: c 
       AIC      BIC    logLik
   125.1006 131.5442 -58.55029

Correlation Structure: corMartins
 Formula: ~1  
 Parameter estimate(s):
alpha 
    1 

Coefficients:
               Value Std.Error    t-value p-value
(Intercept)    0.4940905 0.1730082  2.8558795  0.0070
cent_Latitude -0.1592109 0.1726268 -0.9222837  0.3624

 Correlation: 
          (Intr)
cent_Latitude -0.158

Standardized residuals:
   Min         Q1        Med         Q3        Max 
-1.3270048 -0.7088524 -0.2828898  0.4672255  2.2203523 

Residual standard error: 1.066911 
Degrees of freedom: 39 total; 37 residual

这里是 m5

Generalized least squares fit by REML
  Model: Area_Km2 ~ PCptail 
  Data: c 
       AIC      BIC    logLik
  127.0635 133.5072 -59.53175

Correlation Structure: corMartins
 Formula: ~1 
 Parameter estimate(s):
alpha 
    1 

Coefficients:
             Value  Std.Error   t-value p-value
(Intercept) 0.19752329 0.20158500 0.9798512  0.3335
PCptail     0.01925621 0.00851536 2.2613499  0.0297

 Correlation: 
        (Intr)
PCptail -0.595

Standardized residuals:
       Min         Q1        Med         Q3        Max 
-1.3416127 -0.6677304 -0.2467510  0.3198370  2.3339127 

Residual standard error: 1.01147 
Degrees of freedom: 39 total; 37 residual
4

2 回答 2

3

这里至少发生了两件事。首先,断言具有最低 AIC 的模型是“最佳”模型是没有意义的。对于具有不同 AIC 的一组模型,第 i模型优于具有最低 AIC 的模型的相对概率由下式给出:(参见此处,以及其中引用的参考资料):

L = exp[ ( AIC min - AIC i ) / 2 ]

因此,比较m5m6

L = exp[ (125.1006 - 127.0635) / 2 ] = 0.374

或者,有 37% 的机会m5实际上是更好的模型。关键是 125.2 的 AIC 和 127 的 AIC 之间没有显着差异,所以你不能说它m6是“最好的”。两种模型的表现都差不多。

那么为什么是cent_Latitude微不足道的m6呢?p 值 > 0.05 表示cent_Latitude与响应中的误差相比, 对响应的影响较小。这可能是因为真实效应大小为 0,或者它可能是因为效应大小与范围相结合cent_latitude导致对响应的影响与响应中的误差相比较小。您可以在下面看到这一点,它使用虚构的数据并创建您使用真实数据看到的相同效果。

假设响应变量实际上取决于cent_LatitudePCptail。在中m6PCptailcent_Latitude另一方面,m5由于 的影响而导致的响应变异性cent_Latitude被计入误差,从而降低了 的显着性PCptail。如果效果大小与真实误差相比,恰到好处,您可以获得此效果,如下所示。请注意,这是不建议使用单一统计量(如 AIC、RSQ 甚至 F)比较非嵌套模型的原因之一。

library(nlme)
set.seed(1)
# for simplicity, use un-correlated predictors
c <- data.frame(PCptail=sample(seq(0,10,.1),length(seq)),
                cent_Latitude=sample(seq(0,1,.01),length(seq)))
# response depends on both predictors
c$Area <- 1 + .01*c$PCptail +.1*c$cent_Latitude + rnorm(nrow(c),0,1)
m6 <- gls(Area~cent_Latitude,c)
m5 <- gls(Area~PCptail,c)
summary(m6)
# Generalized least squares fit by REML
#   Model: Area ~ cent_Latitude 
#   Data: c 
#        AIC      BIC    logLik
#   288.5311 296.3165 -141.2656
# 
# Coefficients:
#                    Value Std.Error   t-value p-value
# (Intercept)    1.1835936 0.1924341  6.150645  0.0000
# cent_Latitude -0.1882202 0.3324754 -0.566118  0.5726
# ...
summary(m5)
# Generalized least squares fit by REML
#   Model: Area ~ PCptail 
#   Data: c 
#        AIC      BIC    logLik
#   289.2713 297.0566 -141.6356
# 
# Coefficients:
#                 Value  Std.Error  t-value p-value
# (Intercept) 0.7524261 0.18871413 3.987121  0.0001
# PCptail     0.0674115 0.03260484 2.067530  0.0413
# ...

那么如何处理呢?那么,你看过所有这些模型的残差图了吗?你看过QQ图吗?利用地块?一般来说,在所有其他方面都相同的情况下,我会选择具有更重要参数的模型,假设残差是随机且正态分布的,并且没有一个数据点具有异常高的杠杆率。

于 2014-03-26T18:49:41.703 回答
2

method = "REML"您正在使用受限可能性拟合模型。并不总是意味着 REML 下的最大似然将接近无限制 ML 下的似然。设置method = "ML"并查看是否可以解决 AIC/BIC 的“问题”。

于 2014-03-26T20:57:06.607 回答