diff --git a/R/scdhlm-package.r b/R/scdhlm-package.r index 9d3148c2..f2105d06 100644 --- a/R/scdhlm-package.r +++ b/R/scdhlm-package.r @@ -15,15 +15,23 @@ #' as described in Hedges, Pustejovsky, and Shadish (2012). #' } #' -#' The package also includes the data used in the examples from each paper, as well as a few other datasets: +#' The package also includes the data used in the examples from each paper, as well as several other datasets: #' \itemize{ -#' \item \code{\link{Lambert}} +#' \item \code{\link{AlberMorgan}} #' \item \code{\link{Anglesea}} -#' \item \code{\link{Saddler}} +#' \item \code{\link{BartonArwood}} +#' \item \code{\link{Bryant2018}} +#' \item \code{\link{Carson}} +#' \item \code{\link{Lambert}} #' \item \code{\link{Laski}} +#' \item \code{\link{Musser}} +#' \item \code{\link{Rodriguez}} +#' \item \code{\link{Ruiz}} +#' \item \code{\link{Saddler}} #' \item \code{\link{Schutte}} +#' \item \code{\link{Thiemann2001}} +#' \item \code{\link{Thiemann2004}} #' \item \code{\link{Thorne}} -#' \item \code{\link{Carson}} #' } #' #' @author James E. Pustejovsky @@ -188,7 +196,7 @@ NULL #' \item \code{case}. Participant identifier. #' \item \code{measure}. Outcome measure description (academic engagement or inappropriate verbalizations). #' \item \code{session}. Measurement occasion. -#' \item \code{phase_id}. Factor descibing the phase of the study design for each case. +#' \item \code{phase_id}. Factor describing the phase of the study design for each case. #' \item \code{phase_indicator}. Indicator variable equal to 1 during intervention phases. #' \item \code{outcome}. Outcome scores #' } @@ -208,7 +216,7 @@ NULL #' \itemize{ #' \item \code{case} Participant identifier #' \item \code{treatment} Factor describing the treatment condition -#' \item \code{phase} Numeric descibing the phase of the study design for each case +#' \item \code{phase} Numeric describing the phase of the study design for each case #' \item \code{outcome} Outcome scores #' \item \code{time} Measurement occasion #' } diff --git a/R/simulation-functions.R b/R/simulation-functions.R index 16001274..2e42fa87 100644 --- a/R/simulation-functions.R +++ b/R/simulation-functions.R @@ -373,7 +373,7 @@ fit_g <- function(y, object) { #' @param object a \code{g_REML} object #' @param nsim number of models to simulate #' @param seed seed value. See documentation for \code{\link{simulate}} -#' @param parallel if \code{TRUE}, run in parallel using foreach backend. +#' @param parallel if \code{TRUE}, run in parallel using \code{foreach} backend. #' @param ... additional optional arguments #' #' @export diff --git a/man/Carson.Rd b/man/Carson.Rd index a98c5aca..a939a20f 100644 --- a/man/Carson.Rd +++ b/man/Carson.Rd @@ -19,7 +19,7 @@ variables are as follows: \itemize{ \item \code{case} Participant identifier \item \code{treatment} Factor describing the treatment condition - \item \code{phase} Numeric descibing the phase of the study design for each case + \item \code{phase} Numeric describing the phase of the study design for each case \item \code{outcome} Outcome scores \item \code{time} Measurement occasion } diff --git a/man/Thorne.Rd b/man/Thorne.Rd index 90a006b7..f99857a6 100644 --- a/man/Thorne.Rd +++ b/man/Thorne.Rd @@ -17,7 +17,7 @@ Data from an ABAB design conducted by Thorne and Kamps (2008). The variables are \item \code{case}. Participant identifier. \item \code{measure}. Outcome measure description (academic engagement or inappropriate verbalizations). \item \code{session}. Measurement occasion. - \item \code{phase_id}. Factor descibing the phase of the study design for each case. + \item \code{phase_id}. Factor describing the phase of the study design for each case. \item \code{phase_indicator}. Indicator variable equal to 1 during intervention phases. \item \code{outcome}. Outcome scores } diff --git a/man/scdhlm.Rd b/man/scdhlm.Rd index 9de8ef13..fd6b7961 100644 --- a/man/scdhlm.Rd +++ b/man/scdhlm.Rd @@ -21,15 +21,23 @@ as described in Hedges, Pustejovsky, and Shadish (2013). as described in Hedges, Pustejovsky, and Shadish (2012). } -The package also includes the data used in the examples from each paper, as well as a few other datasets: +The package also includes the data used in the examples from each paper, as well as several other datasets: \itemize{ -\item \code{\link{Lambert}} +\item \code{\link{AlberMorgan}} \item \code{\link{Anglesea}} -\item \code{\link{Saddler}} +\item \code{\link{BartonArwood}} +\item \code{\link{Bryant2018}} +\item \code{\link{Carson}} +\item \code{\link{Lambert}} \item \code{\link{Laski}} +\item \code{\link{Musser}} +\item \code{\link{Rodriguez}} +\item \code{\link{Ruiz}} +\item \code{\link{Saddler}} \item \code{\link{Schutte}} +\item \code{\link{Thiemann2001}} +\item \code{\link{Thiemann2004}} \item \code{\link{Thorne}} -\item \code{\link{Carson}} } } \references{ diff --git a/man/simulate.g_REML.Rd b/man/simulate.g_REML.Rd index 83306ac7..b92a5fee 100644 --- a/man/simulate.g_REML.Rd +++ b/man/simulate.g_REML.Rd @@ -13,7 +13,7 @@ \item{seed}{seed value. See documentation for \code{\link{simulate}}} -\item{parallel}{if \code{TRUE}, run in parallel using foreach backend.} +\item{parallel}{if \code{TRUE}, run in parallel using \code{foreach} backend.} \item{...}{additional optional arguments} } diff --git a/vignettes/Estimating-effect-sizes.Rmd b/vignettes/Estimating-effect-sizes.Rmd index cf75e71e..f2ccde63 100644 --- a/vignettes/Estimating-effect-sizes.Rmd +++ b/vignettes/Estimating-effect-sizes.Rmd @@ -76,7 +76,7 @@ cbind(quality = unlist(quality_ES), construction = unlist(construction_ES))[c("delta_hat","V_delta_hat","nu","phi","rho"),] ``` -For multiple baseline designs, an alternative to using the `effect_size_MB` function is to estimate a hierarchical linear model for the data and then use the `g_REML` function. The two alternative approaches differ in how the model parameters and effect size are estimated. Pustejovsky, Hedges, and Shadish (2014) found that the latter approach (based on a heirarchical linear model) has comparable mean-squared error to the former approach, while producing better estimates of the variance of the effect size. The latter approach is implemented in two steps, which will be demonstrated using the writing quality measure. First, estimate the hierarchical model with an AR(1) within-case error structure using the `lme` function: +For multiple baseline designs, an alternative to using the `effect_size_MB` function is to estimate a hierarchical linear model for the data and then use the `g_REML` function. The two alternative approaches differ in how the model parameters and effect size are estimated. Pustejovsky, Hedges, and Shadish (2014) found that the latter approach (based on a hierarchical linear model) has comparable mean-squared error to the former approach, while producing better estimates of the variance of the effect size. The latter approach is implemented in two steps, which will be demonstrated using the writing quality measure. First, estimate the hierarchical model with an AR(1) within-case error structure using the `lme` function: ```{r} quality_RML <- lme(fixed = outcome ~ treatment, random = ~ 1 | case, @@ -187,7 +187,7 @@ hlm1 <- lme(fixed = fatigue ~ week + treatment + trt_week, method = "REML") summary(hlm1) ``` -The design-comparable standarized mean difference corresponds to the treatment effect at week B = 9, after B - A = 7 weeks of treatment. The corresponding values of `p_const` and `r_const` are specified below. +The design-comparable standardized mean difference corresponds to the treatment effect at week B = 9, after B - A = 7 weeks of treatment. The corresponding values of `p_const` and `r_const` are specified below. ```{r} Schutte_g1 <- g_REML(m_fit = hlm1, p_const = c(0,0,1,B - A), r_const = c(1,0,1)) Schutte_g1[c("g_AB","V_g_AB","nu")]