## 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`
Run the code above in your browser using DataLab