| g_mlm | R Documentation | 
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,
  ...
)
mod | 
 Fitted model of class lmeStruct (estimated using
  | 
p_const | 
 Vector of constants for calculating numerator of effect size.
Must be the same length as fixed effects in   | 
mod_denom | 
 Fitted model of class lmeStruct (estimated using
  | 
r_const | 
 Vector of constants for calculating denominator of effect
size. Must be the same length as the number of variance component
parameters in   | 
infotype | 
 Type of information matrix. One of   | 
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
  | 
... | 
 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. \Sexpr[results=rd]{tools:::Rd_expr_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)
summary(Bryant2016_g1)
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)
print(Bryant_g_baseline)
print(Bryant_g_treatment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.