Skip to content

Commit

Permalink
Fixed spelling errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jepusto committed Apr 9, 2020
1 parent 705dfd0 commit 50a11e4
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 16 deletions.
20 changes: 14 additions & 6 deletions R/scdhlm-package.r
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jepusto@@gmail.com>
Expand Down Expand Up @@ -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
#' }
Expand All @@ -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
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/simulation-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/Carson.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/Thorne.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions man/scdhlm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/simulate.g_REML.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/Estimating-effect-sizes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit 50a11e4

Please sign in to comment.