metareg | R Documentation |
This function is a wrapper for metafor's rma
function that computes meta-regressions for all bare-bones and individual-correction meta-analyses within an object.
It makes use of both categorical and continuous moderator information stored in the meta-analysis object and allows for interaction effects to be included in the regression model.
Output from this function will be added to the meta-analysis object in a list called follow_up_analyses
.
If using this function with a multi-construct meta-analysis object from ma_r
or ma_d
, note that the follow_up_analyses
list is appended to the meta-analysis object belonging
to a specific construct pair within the construct_pairs
list.
metareg(ma_obj, formula_list = NULL, ...)
ma_obj |
Meta-analysis object. |
formula_list |
Optional list of regression formulas to evaluate.
NOTE: If there are spaces in your moderator names, replace them with underscores (i.e., "_") so that the formula(s) will perform properly.
The function will remove spaces in the data, you only have to account for this in |
... |
Additional arguments. |
ma_obj with meta-regression results added (see ma_obj$follow_up_analyses$metareg).
## Meta-analyze the data from Gonzalez-Mule et al. (2014)
## Note: These are corrected data and we have confirmed with the author that
## these results are accurate:
ma_obj <- ma_r_ic(rxyi = rxyi, n = n, hs_override = TRUE, data = data_r_gonzalezmule_2014,
rxx = rxxi, ryy = ryyi, ux = ux, indirect_rr_x = TRUE,
correct_rr_x = TRUE, moderators = Complexity)
## Pass the meta-analysis object to the meta-regression function:
ma_obj <- metareg(ma_obj)
## Examine the meta-regression results for the bare-bones and corrected data:
ma_obj$metareg[[1]]$barebones$`Main Effects`
ma_obj$metareg[[1]]$individual_correction$true_score$`Main Effects`
## Meta-analyze simulated d-value data
dat <- data_d_meas_multi
## Simulate a random moderator
set.seed(100)
dat$moderator <- sample(1:2, nrow(dat), replace = TRUE)
ma_obj <- ma_d(ma_method = "ic", d = d, n1 = n1, n2 = n2, ryy = ryyi,
construct_y = construct, sample_id = sample_id,
moderators = moderator, data = dat)
## Pass the meta-analysis object to the meta-regression function:
ma_obj <- metareg(ma_obj)
## Examine the meta-regression results for the bare-bones and corrected data:
ma_obj$metareg[[1]]$barebones$`Main Effects`
ma_obj$metareg[[1]]$individual_correction$latentGroup_latentY$`Main Effects`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.