View source: R/REML-ES-functions.R
g_REML | R Documentation |
Estimates a design-comparable standardized mean difference effect size based on data from a multiple baseline design, using adjusted REML method as described in Pustejovsky, Hedges, & Shadish (2014). Note that the data must contain one row per measurement occasion per case.
g_REML(
m_fit,
p_const,
r_const,
X_design = model.matrix(m_fit, data = m_fit$data),
Z_design = model.matrix(m_fit$modelStruct$reStruct, data = m_fit$data),
block = nlme::getGroups(m_fit),
times = attr(m_fit$modelStruct$corStruct, "covariate"),
returnModel = TRUE
)
m_fit |
Fitted model of class lme, with AR(1) correlation structure at level 1. |
p_const |
Vector of constants for calculating numerator of effect size.
Must be the same length as fixed effects in |
r_const |
Vector of constants for calculating denominator of effect size.
Must be the same length as the number of variance component parameters in |
X_design |
(Optional) Design matrix for fixed effects. Will be extracted from |
Z_design |
(Optional) Design matrix for random effects. Will be extracted from |
block |
(Optional) Factor variable describing the blocking structure. Will be extracted from |
times |
(Optional) list of times used to describe AR(1) structure. Will be extracted from |
returnModel |
(Optional) If true, the fitted input model is included in the return. |
A list with the following components
p_beta | Numerator of effect size |
r_theta | Squared denominator of effect size |
delta_AB | Unadjusted (REML) effect size estimate |
nu | Estimated denominator degrees of freedom |
kappa | Scaled standard error of numerator |
g_AB | Corrected effect size estimate |
V_g_AB | Approximate variance estimate |
cnvg_warn | Indicator that model did not converge |
sigma_sq | Estimated level-1 variance |
phi | Estimated autocorrelation |
Tau | Vector of level-2 variance components |
I_E_inv | Expected 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")}
data(Laski)
Laski_RML <- lme(fixed = outcome ~ treatment,
random = ~ 1 | case,
correlation = corAR1(0, ~ time | case),
data = Laski)
summary(Laski_RML)
g_REML(Laski_RML, p_const = c(0,1), r_const = c(1,0,1), returnModel=FALSE)
data(Schutte)
Schutte$trt.week <- with(Schutte, unlist(tapply((treatment=="treatment") * week,
list(treatment,case), function(x) x - min(x))) + (treatment=="treatment"))
Schutte$week <- Schutte$week - 9
Schutte_RML <- lme(fixed = fatigue ~ week + treatment + trt.week,
random = ~ week | case,
correlation = corAR1(0, ~ week | case),
data = subset(Schutte, case != 4))
summary(Schutte_RML)
Schutte_g <- g_REML(Schutte_RML, p_const = c(0,0,1,7), r_const = c(1,0,1,0,0))
summary(Schutte_g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.