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:15] – Wolfgang Viechtbauer | tips:model_selection_with_glmulti_and_mumin [2022/08/09 05:28] – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 5: | Line 5: | ||
==== Data Preparation ==== | ==== Data Preparation ==== | ||
- | For the example, I will use data from the meta-analysis by Bangert-Drowns et al. (2004) on the effectiveness of school-based writing-to-learn interventions on academic achievement ('' | + | For the example, I will use data from the meta-analysis by Bangert-Drowns et al. (2004) on the effectiveness of school-based writing-to-learn interventions on academic achievement ('' |
<code rsplus> | <code rsplus> | ||
library(metafor) | library(metafor) | ||
Line 43: | Line 43: | ||
* length: treatment length (in weeks) | * length: treatment length (in weeks) | ||
- | * wic: writing in class (0 = no; 1 = yes) | + | * wic: writing |
- | * feedback: feedback (0 = no; 1 = yes) | + | * feedback: feedback |
* info: writing contained informational components (0 = no; 1 = yes) | * info: writing contained informational components (0 = no; 1 = yes) | ||
* pers: writing contained personal components (0 = no; 1 = yes) | * pers: writing contained personal components (0 = no; 1 = yes) | ||
* imag: writing contained imaginative components (0 = no; 1 = yes) | * imag: writing contained imaginative components (0 = no; 1 = yes) | ||
- | * meta: prompts for metacognitive reflection (0 = no; 1 = yes) | + | * meta: prompts for metacognitive reflection |
More details about the meaning of these variables can be found in Bangert-Drowns et al. (2004). For the purposes of this illustration, | More details about the meaning of these variables can be found in Bangert-Drowns et al. (2004). For the purposes of this illustration, | ||
Line 59: | Line 59: | ||
==== Model Selection ==== | ==== Model Selection ==== | ||
- | We will now examine the fit and plausibility of various models, focusing on models that contain none, one, and up to seven (i.e., all) of these moderator variables. For this, we need to install and load the glmulti package and define a function that takes a model formula and a dataset as input and then fits a random/mixed-effects meta-regression model to the given data using maximum likelihood estimation: | + | We will now examine the fit and plausibility of various models, focusing on models that contain none, one, and up to seven (i.e., all) of these moderator variables. For this, we install and load the glmulti package and define a function that (a) takes a model formula and dataset as input and (b) then fits a mixed-effects meta-regression model to the given data using maximum likelihood estimation: |
<code rsplus> | <code rsplus> | ||
install.packages(" | install.packages(" | ||
Line 123: | Line 123: | ||
</ | </ | ||
- | We see that the " | + | We see that the " |
So, we could now examine the " | So, we could now examine the " |
tips/model_selection_with_glmulti_and_mumin.txt · Last modified: 2022/10/13 06:07 by Wolfgang Viechtbauer