The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:model_selection_with_glmulti_and_mumin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:model_selection_with_glmulti_and_mumin [2021/03/16 20:20] Wolfgang Viechtbauertips:model_selection_with_glmulti_and_mumin [2022/08/03 11:33] Wolfgang Viechtbauer
Line 10: Line 10:
 dat <- dat.bangertdrowns2004 dat <- dat.bangertdrowns2004
 </code> </code>
-(I copy the dataset into 'dat', which is a bit shorter and therefore easier to type further below). We can look at the first 10 and the last 10 rows of the dataset with:+(I copy the dataset into ''dat'', which is a bit shorter and therefore easier to type further below). We can look at the first 10 and the last 10 rows of the dataset with:
 <code rsplus> <code rsplus>
 rbind(head(dat, 10), tail(dat, 10)) rbind(head(dat, 10), tail(dat, 10))
Line 132: Line 132:
 Mixed-Effects Model (k = 41; tau^2 estimator: ML) Mixed-Effects Model (k = 41; tau^2 estimator: ML)
  
-  logLik  deviance       AIC       BIC      AICc  +  logLik  deviance       AIC       BIC      AICc 
- -3.4268   56.9171   12.8536   17.9943   13.5022   + -3.4268   56.9171   12.8536   17.9943   13.5022
  
 tau^2 (estimated amount of residual heterogeneity):     0.0088 (SE = 0.0084) tau^2 (estimated amount of residual heterogeneity):     0.0088 (SE = 0.0084)
Line 149: Line 149:
 Model Results: Model Results:
  
-         estimate      se    zval    pval   ci.lb   ci.ub  +         estimate      se    zval    pval   ci.lb   ci.ub 
-intrcpt    0.1439  0.0347  4.1477  <.0001  0.0759  0.2119  ***  +intrcpt    0.1439  0.0347  4.1477  <.0001  0.0759  0.2119  *** 
-imag       0.4437  0.1442  3.0764  0.0021  0.1610  0.7264   ** +imag       0.4437  0.1442  3.0764  0.0021  0.1610  0.7264   **
  
 --- ---
Line 180: Line 180:
 coef(res) coef(res)
 </code> </code>
-The output is not shown, because I don't find it very intuitive. But with a bit of extra code, we can make it more interpretable: +The output is not shown, because I don't find it very intuitive. But with a bit of extra code, we can make it more interpretable:
 <code rsplus> <code rsplus>
 mmi <- as.data.frame(coef(res)) mmi <- as.data.frame(coef(res))
Line 310: Line 310:
 </code> </code>
 <code output> <code output>
-Global model call: rma(yi = yi, vi = vi, mods = ~length + wic + feedback + info + +Global model call: rma(yi = yi, vi = vi, mods = ~length + wic + feedback + info +
     pers + imag + meta, data = dat, method = "ML")     pers + imag + meta, data = dat, method = "ML")
 --- ---
-Model selection table +Model selection table
    (Intrc)   fdbck   imag    lngth    meta    pers      wic df logLik AICc delta weight    (Intrc)   fdbck   imag    lngth    meta    pers      wic df logLik AICc delta weight
 3        +         0.4437                                    3 -3.427 13.5  0.00  0.067 3        +         0.4437                                    3 -3.427 13.5  0.00  0.067
Line 334: Line 334:
 </code> </code>
 <code output> <code output>
-Model-averaged coefficients:   +Model-averaged coefficients: 
-(full average)  +(full average) 
-          Estimate Std. Error z value Pr(>|z|)   +          Estimate Std. Error z value Pr(>|z|) 
-intrcpt   0.108404   0.095613   1.134   0.2569  +intrcpt   0.108404   0.095613   1.134   0.2569
 imag      0.351153   0.189530   1.853   0.0639 . imag      0.351153   0.189530   1.853   0.0639 .
-meta      0.051201   0.076700   0.668   0.5044   +meta      0.051201   0.076700   0.668   0.5044 
-feedback  0.036604   0.060711   0.603   0.5466   +feedback  0.036604   0.060711   0.603   0.5466 
-length    0.002272   0.004138   0.549   0.5830   +length    0.002272   0.004138   0.549   0.5830 
-wic      -0.017004   0.039337   0.432   0.6655   +wic      -0.017004   0.039337   0.432   0.6655 
-pers      0.013244   0.044679   0.296   0.7669   +pers      0.013244   0.044679   0.296   0.7669 
-info     -0.018272   0.051631   0.354   0.7234  +info     -0.018272   0.051631   0.354   0.7234
 </code> </code>
 I have removed some of the output, since this is the part we are most interested in. These are the same results as in object ''mmi'' shown earlier. Note that, by default, ''model.avg()'' uses a slightly different equation for computing the unconditional standard errors. To get the same results as we obtained with glmulti, I set ''revised.var=FALSE''. I have removed some of the output, since this is the part we are most interested in. These are the same results as in object ''mmi'' shown earlier. Note that, by default, ''model.avg()'' uses a slightly different equation for computing the unconditional standard errors. To get the same results as we obtained with glmulti, I set ''revised.var=FALSE''.
tips/model_selection_with_glmulti_and_mumin.txt · Last modified: 2022/10/13 06:07 by Wolfgang Viechtbauer