g_mlm.Rd
Estimates a standardized mean difference effect size from a fitted multi-level model, using restricted or full maximum likelihood methods with small-sample correction, as described in Pustejovsky, Hedges, & Shadish (2014).
g_mlm(
mod,
p_const,
mod_denom = mod,
r_const = NULL,
infotype = "expected",
separate_variances = FALSE,
...
)
Fitted model of class lmeStruct (estimated using
nlme::lme()
) or of class glsStruct (estimated using
nlme::gls()
), from which to estimate the numerator of the effect
size.
Vector of constants for calculating numerator of effect size.
Must be the same length as fixed effects in mod
.
Fitted model of class lmeStruct (estimated using
nlme::lme()
) or of class glsStruct (estimated using
nlme::gls()
), from which to estimate the denominator of the effect
size. If not otherwise specified, the same model will be used for the
numerator and the denominator calculations.
Vector of constants for calculating denominator of effect
size. Must be the same length as the number of variance component
parameters in mod_denom
.
Type of information matrix. One of "expected"
(the
default), "observed"
, or "average"
.
Logical indicating whether to incorporate separate
level-1 variance components in the calculation of the effect size and
standard error for models with a `varIdent()` variance structure. If
TRUE
, make sure the r_const
matches the parameterization of
the variance component as returned by extract_varcomp(mod,
separate_variances = TRUE)
. Default is FALSE
.
further arguments.
A list with the following components
p_beta | Numerator of effect size |
r_theta | Squared denominator of effect size |
delta_AB | Unadjusted (mlm) effect size estimate |
nu | Estimated denominator degrees of freedom |
J_nu | Biased correction factor for effect size estimate |
kappa | Scaled standard error of numerator |
g_AB | Corrected effect size estimate |
SE_g_AB | Approximate standard error estimate |
theta | Estimated variance component parameters |
info_inv | Inversed information matrix |
Pustejovsky, J. E., Hedges, L. V., & Shadish, W. R. (2014). Design-comparable effect sizes in multiple baseline designs: A general modeling framework. Journal of Educational and Behavioral Statistics, 39(4), 211-227. doi:10.3102/1076998614547577
library(nlme)
data(Bryant2016, package = "lmeInfo")
Bryant2016_RML1 <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
data = Bryant2016)
Bryant2016_g1 <- g_mlm(Bryant2016_RML1, p_const = c(0,1), r_const = c(1,1,0,1),
infotype = "expected")
print(Bryant2016_g1)
#> est se
#> unadjusted effect size 0.481 0.122
#> adjusted effect size 0.463 0.118
#> degree of freedom 20.169
summary(Bryant2016_g1)
#> est se
#> Tau.school.school.var((Intercept)) 105.619 285.200
#> Tau.case.case.var((Intercept)) 0.000 632.159
#> cor_params 0.978 0.015
#> sigma_sq 1058.302 678.388
#> total variance 1163.921 366.515
#> (Intercept) 84.571 9.684
#> treatmenttreatment 16.425 2.975
#> treatment effect at a specified time 16.425 2.975
#> unadjusted effect size 0.481 0.122
#> adjusted effect size 0.463 0.118
#> degree of freedom 20.169
#> constant kappa 0.087
#> logLik -1133.122
Bryant2016_RML2 <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
weights = varIdent(form = ~ 1 | treatment),
data = Bryant2016)
Bryant_g <- g_mlm(Bryant2016_RML2, p_const = c(0,1), r_const = c(1,1,0,0,1))
Bryant_g_baseline <- g_mlm(Bryant2016_RML2,
p_const = c(0,1),
r_const = c(1,1,0,1,0),
separate_variances = TRUE)
Bryant_g_treatment <- g_mlm(Bryant2016_RML2,
p_const = c(0,1),
r_const = c(1,1,0,0,1),
separate_variances = TRUE)
print(Bryant_g)
#> est se
#> unadjusted effect size 0.783 0.201
#> adjusted effect size 0.739 0.190
#> degree of freedom 13.789
print(Bryant_g_baseline)
#> est se
#> unadjusted effect size 0.783 0.201
#> adjusted effect size 0.739 0.190
#> degree of freedom 13.789
print(Bryant_g_treatment)
#> est se
#> unadjusted effect size 0.650 0.144
#> adjusted effect size 0.625 0.139
#> degree of freedom 20.109