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,
  ...
)

Arguments

mod

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.

p_const

Vector of constants for calculating numerator of effect size. Must be the same length as fixed effects in mod.

mod_denom

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.

r_const

Vector of constants for calculating denominator of effect size. Must be the same length as the number of variance component parameters in mod_denom.

infotype

Type of information matrix. One of "expected" (the default), "observed", or "average".

separate_variances

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.

Value

A list with the following components

p_betaNumerator of effect size
r_thetaSquared denominator of effect size
delta_ABUnadjusted (mlm) effect size estimate
nuEstimated denominator degrees of freedom
J_nuBiased correction factor for effect size estimate
kappaScaled standard error of numerator
g_ABCorrected effect size estimate
SE_g_ABApproximate standard error estimate
cnvg_warnIndicator that model did not converge
thetaEstimated variance component parameters
info_invInversed information matrix

References

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

Examples


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.case.case.var((Intercept))           0.000 285.200
#> Tau.school.school.var((Intercept))     105.619 632.159
#> cor_params                               0.978   0.015
#> sigma_sq                              1058.303 678.388
#> total variance                        1163.922 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