# NOT RUN {
# A meta-analysis of 18 studies in which the effect of open versus traditional
# education on students' self-concept was studied (Hedges et al., 1981).
selfconcept <- mc.heterogeneity:::selfconcept
# n1 and n2 are lists of samples sizes in two groups
n1 <- selfconcept$n1
n2 <- selfconcept$n2
# g is a list of biased estimates of standardized mean differences in the meta-analytical study
g <- selfconcept$g
cm <- (1-3/(4*(n1+n2-2)-1)) #correct factor to compensate for small sample bias (Hedges, 1981)
d <- cm*g
# }
# NOT RUN {
mc.run <- mc.d(n1, n2, est = d, model = 'random', p_cut = 0.05)
# is equivalent to:
mc.run2 <- mc.d(n1, n2, est = g, model = 'random', adjust = TRUE, p_cut = 0.05)
# }
# NOT RUN {
# A hypothetical meta-analysis of 15 studies with 3 moderators.
hypo_moder <- mc.heterogeneity:::hypo_moder
# }
# NOT RUN {
mc.run3 <- mc.d(n1 = hypo_moder$n1, n2 = hypo_moder$n2, est = hypo_moder$d, model = 'mixed',
mods = cbind(hypo_moder$cov.z1, hypo_moder$cov.z2, hypo_moder$cov.z3), p_cut = 0.05)
# }
# NOT RUN {
## Note: this mc.d() function will soon be deprecated
## and replaced by \link[boot.heterogeneity]{boot.d} in
## package [boot.heterogeneity](https://CRAN.R-project.org/package=boot.heterogeneity).
# }
Run the code above in your browser using DataLab