tips:model_selection_with_glmulti_and_mumin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tips:model_selection_with_glmulti_and_mumin [2022/08/09 05:28] – Wolfgang Viechtbauer | tips:model_selection_with_glmulti_and_mumin [2022/08/09 13:15] – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Model Selection using the glmulti and MuMIn Packages ===== | ===== Model Selection using the glmulti and MuMIn Packages ===== | ||
- | Information-theoretic approaches provide methods for model selection and (multi)model inference that differ quite a bit from more traditional methods based on null hypothesis testing (e.g., Anderson, | + | Information-theoretic approaches provide methods for model selection and (multi)model inference that differ quite a bit from more traditional methods based on null hypothesis testing (e.g., Anderson, |
==== Data Preparation ==== | ==== Data Preparation ==== | ||
Line 101: | Line 101: | ||
{{ tips: | {{ tips: | ||
- | The horizontal red line differentiates between models whose AICc value is less versus more than 2 units away from that of the " | + | The horizontal red line differentiates between models whose AICc value is less versus more than 2 units away from that of the " |
But let's take a look at the top 10 models: | But let's take a look at the top 10 models: | ||
Line 178: | Line 178: | ||
Now we can carry out the computations for multimodel inference with: | Now we can carry out the computations for multimodel inference with: | ||
<code rsplus> | <code rsplus> | ||
- | coef(res) | + | coef(res, varweighting=" |
</ | </ | ||
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, varweighting=" |
mmi <- data.frame(Estimate=mmi$Est, | mmi <- data.frame(Estimate=mmi$Est, | ||
mmi$z <- mmi$Estimate / mmi$SE | mmi$z <- mmi$Estimate / mmi$SE | ||
Line 195: | Line 195: | ||
<code output> | <code output> | ||
| | ||
- | intrcpt | + | intrcpt |
- | imag | + | imag |
- | meta | + | meta |
- | feedback | + | feedback |
- | length | + | length |
- | pers | + | pers |
- | wic | + | wic |
- | info -0.0183 | + | info -0.0183 |
</ | </ | ||
- | I rounded the results to 4 digits to make the results easier to interpret. Note that the table again includes the importance values. In addition, we get unconditional estimates of the model coefficients (first column). These are model-averaged parameter estimates, which are weighted averages of the model coefficients across the various models (with weights equal to the model probabilities). These values are called " | + | I rounded the results to 4 digits to make the results easier to interpret. Note that the table again includes the importance values. In addition, we get unconditional estimates of the model coefficients (first column). These are model-averaged parameter estimates, which are weighted averages of the model coefficients across the various models (with weights equal to the model probabilities). These values are called " |
==== Multimodel Predictions ==== | ==== Multimodel Predictions ==== | ||
Line 331: | Line 331: | ||
Multimodel inference can be done with: | Multimodel inference can be done with: | ||
<code rsplus> | <code rsplus> | ||
- | summary(model.avg(res, revised.var=FALSE)) | + | summary(model.avg(res)) |
</ | </ | ||
<code output> | <code output> | ||
Line 337: | Line 337: | ||
(full average) | (full average) | ||
Estimate Std. Error z value Pr(>|z|) | Estimate Std. Error z value Pr(>|z|) | ||
- | intrcpt | + | intrcpt |
- | imag 0.351153 | + | imag 0.351153 |
- | meta 0.051201 | + | meta 0.051201 |
- | feedback | + | feedback |
- | length | + | length |
- | wic -0.017004 | + | wic -0.017004 |
- | pers 0.013244 | + | pers 0.013244 |
- | info | + | info |
</ | </ | ||
- | 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 '' | + | 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 '' |
Finally, the relative importance values for the predictors can be obtained with: | Finally, the relative importance values for the predictors can be obtained with: | ||
<code rsplus> | <code rsplus> | ||
- | importance(res) | + | sw(res) |
</ | </ | ||
<code output> | <code output> | ||
Line 361: | Line 361: | ||
==== References ==== | ==== References ==== | ||
- | Anderson, D. R. (2007). //Model based inference in the life sciences: A primer on evidence//. New York: Springer. | + | Anderson, D. R. (2008). //Model based inference in the life sciences: A primer on evidence//. New York: Springer. |
Bangert-Drowns, | Bangert-Drowns, |
tips/model_selection_with_glmulti_and_mumin.txt · Last modified: 2022/10/13 06:07 by Wolfgang Viechtbauer