如何解释二项式GLMM结果

时间:2017-03-30 15:58:57

标签: r analysis glm lsmeans

我有一个大型数据集(24765 obs) 我试着看看清洁方法如何影响出现成功(ES)。 我有几个因素:海滩(4级),清洁方法(3级) - >固定 我也有一些随机变量:区域(128级),年份(18年)和索引(24765) 这是一个ORLE模型来解释过度离散。

基于AIC分数的最佳拟合模型是:

    mod8a<-glmer(ES.test~beach+method+(1|Year)+(1|index),data=y5,weights=egg.total,family=binomial)

摘要显示:

    summary(mod8a)#AIC=216732.9, same affect at every beach
  Generalized linear mixed model fit by maximum likelihood (LaplaceApproximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: ES.test ~ beach + method + (1 | Year) + (1 | index)
   Data: y5
Weights: egg.total

      AIC       BIC    logLik  deviance  df.resid 
 214834.2  214891.0 -107410.1  214820.2     24758 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.92900 -0.09344  0.00957  0.14682  1.62327 

Random effects:
 Groups Name        Variance Std.Dev.
 index  (Intercept) 1.6541   1.286   
 Year   (Intercept) 0.6512   0.807   
Number of obs: 24765, groups:  index, 24765; Year, 19

Fixed effects:
               Estimate Std. Error z value Pr(>|z|)    
(Intercept)     0.65518    0.18646   3.514 0.000442 ***
beachHillsboro -0.06770    0.02143  -3.159 0.001583 ** 
beachHO/HA      0.31927    0.03716   8.591  < 2e-16 ***
methodHTL only  0.18106    0.02526   7.169 7.58e-13 ***
methodno clean  0.05989    0.03170   1.889 0.058853 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) bchHll bHO/HA mtHTLo
beachHllsbr -0.002                     
beachHO/HA  -0.054  0.047              
mthdHTLonly -0.107 -0.242  0.355       
methodnclen -0.084 -0.060  0.265  0.628

我的“拦截”是什么(如上所示)?我缺少固定因子的水平,是因为R无法计算它?

我测试了Overdispersion:

overdisp_fun <- function(mod8a) {
+   ## number of variance parameters in 
+   ##   an n-by-n variance-covariance matrix
+   vpars <- function(m) {
+     nrow(m)*(nrow(m)+1)/2
+   }
+   
+   model8a.df <- sum(sapply(VarCorr(mod8a),vpars))+length(fixef(mod8a))
+   rdf <- nrow(model.frame(mod8a))-model8a.df
+   rp <- residuals(mod8a,type="pearson")
+   Pearson.chisq <- sum(rp^2)
+   prat <- Pearson.chisq/rdf
+   pval <- pchisq(Pearson.chisq, df=rdf, lower.tail=FALSE)
+   c(chisq=Pearson.chisq,ratio=prat,rdf=rdf,p=pval) 
+ }
> overdisp_fun(mod8a)
       chisq        ratio          rdf            p 
2.064765e+03 8.339790e-02 2.475800e+04 1.000000e+00 

This shows the plot of mod8a 我想知道为什么我会得到这样一条曲线及其含义

最后,我使用multcomp

进行了多比较分析
ls1<- glht(mod8a, mcp(beach = "Tukey"))$linfct
ls2 <- glht(mod8a, mcp(method= "Tukey"))$linfct
summary(glht(mod8a, linfct = rbind(ls1, ls2)))

一般线性假设的同时测试

Fit: glmer(formula = ES.test ~ beach + method + (1 | Year) + (1 | 
    index), data = y5, family = binomial, weights = egg.total)

Linear Hypotheses:
                            Estimate Std. Error z value Pr(>|z|)    
Hillsboro - FTL/P == 0     -0.06770    0.02143  -3.159  0.00821 ** 
HO/HA - FTL/P == 0          0.31927    0.03716   8.591  < 0.001 ***
HO/HA - Hillsboro == 0      0.38696    0.04201   9.211  < 0.001 ***
HTL only - HTL and SB == 0  0.18106    0.02526   7.169  < 0.001 ***
no clean - HTL and SB == 0  0.05989    0.03170   1.889  0.24469    
no clean - HTL only == 0   -0.12117    0.02524  -4.800  < 0.001 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)

此时帮助解释分析将有所帮助,非常感谢。 (特别是我的残差的S形曲线)

0 个答案:

没有答案