Skip to content

Commit

Permalink
Changed auxilliary to auxiliary.
Browse files Browse the repository at this point in the history
  • Loading branch information
manchen07 committed Apr 8, 2020
1 parent 34a7650 commit 705dfd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vignettes/Estimating-effect-sizes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vignette: >

The scdhlm package (Pustejovsky, 2016) provides several methods for estimating design-comparable standardized mean differences (SMDs) based on data from a single-case design. A design-comparable SMD is in the same metric as the SMD from a simple, between-groups randomized experiment performed on a comparable sample and with comparable outcome measures. Hedges, Pustejovsky, and Shadish (2012) proposed methods for estimating design-comparable SMDs based on data from an ABAB design (and, more generally, treatment reversal designs with an arbitrary number of phases); Hedges, Pustejovsky, and Shadish (2013) extended the methods to handle data from multiple baseline designs. In both cases, the proposed estimation methods are premised on a simple model for the data, which assumed that the outcome process is stable over time (lacking time trends) and that the treatment effect is constant across cases. Pustejovsky, Hedges, and Shadish (2014) proposed an approach to defining and estimating design-comparable SMDs under a more general model, which can allow for time trends and between-case variability.

The original estimation methods proposed for the ABAB design and multiple baseline design are implemented in the `effect_size_ABk` and `effect_size_MB` functions, respectively. Both of these functions take the raw data as input and produce as output an effect size estimate, along with accompanying standard error and some other auxilliary information. Thus, there is no distinction between estimating the model and estimating the effect size. In contrast, the more general methods proposed in Pustejovsky, Hedges, and Shadish (2014) entail two steps: first, estimating a hierarchical model for the data; second, estimating a design-comparable effect size based on the fitted model. The first step is accomplished using the function `lme` from the package `nlme` by Pinheiro, Bates, DebRoy, and Sarkar (2015). The second step is accomplished using the function `g_REML` from the `scdhlm` package. This vignette demonstrates how to use all of these functions to estimate design-comparable standardized mean difference effect sizes. The R presented below can be used to replicate the examples found in the papers that proposed the methods. To begin, the user must load the package:
The original estimation methods proposed for the ABAB design and multiple baseline design are implemented in the `effect_size_ABk` and `effect_size_MB` functions, respectively. Both of these functions take the raw data as input and produce as output an effect size estimate, along with accompanying standard error and some other auxiliary information. Thus, there is no distinction between estimating the model and estimating the effect size. In contrast, the more general methods proposed in Pustejovsky, Hedges, and Shadish (2014) entail two steps: first, estimating a hierarchical model for the data; second, estimating a design-comparable effect size based on the fitted model. The first step is accomplished using the function `lme` from the package `nlme` by Pinheiro, Bates, DebRoy, and Sarkar (2015). The second step is accomplished using the function `g_REML` from the `scdhlm` package. This vignette demonstrates how to use all of these functions to estimate design-comparable standardized mean difference effect sizes. The R presented below can be used to replicate the examples found in the papers that proposed the methods. To begin, the user must load the package:
```{r, message = FALSE}
library(scdhlm)
```
Expand All @@ -35,7 +35,7 @@ Lambert_ES <- effect_size_ABk(outcome = outcome, treatment = treatment,
str(Lambert_ES)
```
The function produces a list containing the estimated effect size estimate, an estimate of its variance, and several pieces of auxilliary information. The effect size estimate is stored in the list entry called `delta_hat`, which in this example is equal to `r Lambert_ES$delta_hat`; its variance is stored in `V_delta_hat`, which in this example is equal to `r Lambert_ES$V_delta_hat`. The effect size estimate is bias-corrected in a manner analogous to the correction in Hedges' g for SMDs from a between-subjects design. The degrees of freedom are estimated based on a Satterthwaite-type approximation and are stored in the entry `nu` (equal to `r Lambert_ES$nu` in this example).
The function produces a list containing the estimated effect size estimate, an estimate of its variance, and several pieces of auxiliary information. The effect size estimate is stored in the list entry called `delta_hat`, which in this example is equal to `r Lambert_ES$delta_hat`; its variance is stored in `V_delta_hat`, which in this example is equal to `r Lambert_ES$V_delta_hat`. The effect size estimate is bias-corrected in a manner analogous to the correction in Hedges' g for SMDs from a between-subjects design. The degrees of freedom are estimated based on a Satterthwaite-type approximation and are stored in the entry `nu` (equal to `r Lambert_ES$nu` in this example).

By default, the `effect_size_ABk` function calculates an estimate of the first-order autocorrelation in the outcome series (stored in the entry `phi`) and an estimate of the intra-class correlation, i.e., the ratio of the between-case variance in the outcome to the total cross-sectional variance in the outcome (the intra-class correlation estimate is stored in the entry `rho`). Optionally, the user can specify their own estimates of these parameters as inputs to the function. In this example, the auto-correlation estimated was `r Lambert_ES$phi`. The following code examines the sensitivity of the results to values of the auto-correlation that are larger and smaller than the default estimate of `r Lambert_ES$phi`.
```{r}
Expand Down Expand Up @@ -90,7 +90,7 @@ quality_ES_RML <- g_REML(quality_RML, p_const = c(0,1),
r_const = c(1,0,1), returnModel=FALSE)
str(quality_ES_RML)
```
The function returns a list containing the SMD effect size estimate (`g_AB` = `r quality_ES_RML$g_AB`), its variance (`V_g_AB` = `r quality_ES_RML$V_g_AB`), the estimated auto-correlation (`phi` = `r quality_ES_RML$phi`), estimated degrees of freedom (`nu` = `r quality_ES_RML$nu`), and several other pieces of auxilliary information. In this example, the RML effect size estimate is about 10% larger than the estimate from `effect_size_MB`, with a slightly smaller variance estimate. The RML estimate of the auto-correlation is substantially higher than before, but `effect_size_MB` uses a moment estimator that is known to be biased towards zero and that does not perform well when outcomes are intermittently missing for some sessions (as is the case here).
The function returns a list containing the SMD effect size estimate (`g_AB` = `r quality_ES_RML$g_AB`), its variance (`V_g_AB` = `r quality_ES_RML$V_g_AB`), the estimated auto-correlation (`phi` = `r quality_ES_RML$phi`), estimated degrees of freedom (`nu` = `r quality_ES_RML$nu`), and several other pieces of auxiliary information. In this example, the RML effect size estimate is about 10% larger than the estimate from `effect_size_MB`, with a slightly smaller variance estimate. The RML estimate of the auto-correlation is substantially higher than before, but `effect_size_MB` uses a moment estimator that is known to be biased towards zero and that does not perform well when outcomes are intermittently missing for some sessions (as is the case here).

## Laski, Charlop, & Schreibman (1988)

Expand Down

0 comments on commit 705dfd0

Please sign in to comment.