Tau_BC: Tau-BC

Description Usage Arguments Details Value References Examples

View source: R/non-overlap-measures.R

Description

Calculates the baseline-corrected Tau index (Tarlow 2017).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
Tau_BC(
  A_data,
  B_data,
  condition,
  outcome,
  baseline_phase = unique(condition)[1],
  improvement = "increase",
  SE = "unbiased",
  confidence = 0.95,
  pretest_trend = FALSE,
  report_correction = FALSE
)

Arguments

A_data

vector of numeric data for A phase. Missing values are dropped.

B_data

vector of numeric data for B phase. Missing values are dropped.

condition

vector identifying the treatment condition for each observation in the series.

outcome

vector of outcome data for the entire series.

baseline_phase

character string specifying which value of condition corresponds to the baseline phase. Defaults to first observed value of condition.

improvement

character string indicating direction of improvement. Default is "increase".

SE

character value indicating which formula to use for calculating the standard error of Tau-BC, with possible values "unbiased" for the exactly unbiased estimator, "Hanley" for the Hanley-McNeil estimator, "null" for the (known) variance under the null hypothesis of no effect, or "none" to not calculate a standard error. Defaults to "unbiased". Note that the "unbiased" standard error is unbiased for Tau, but not necessarily unbiased for Tau_BC. None of the standard error formulas account for the additional uncertainty due to use of the baseline trend correction.

confidence

confidence level for the reported interval estimate. Set to NULL to omit confidence interval calculations.

pretest_trend

significance level for the initial baseline trend test. The raw data are corrected and Tau_BC is calculated only if the baseline trend is statistically significant. Otherwise, Tau_BC is equal to Tau. Default is FALSE, which always adjusts for the baseline trend.

report_correction

logical value indicating whether to report the baseline corrected slope and intercept values. Default is FALSE.

Details

Tau-BC is an elaboration of the Tau that includes a correction for baseline trend. The calculation of Tau-BC involves two or three steps, depending on the pretest_trend argument.

If pretest_trend = FALSE (the default), the first step involves adjusting the outcomes for baseline trend estimated using Theil-Sen regression. In the second step, the residuals from Theil-Sen regression are used to calculate the Tau (non-overlap) index.

Alternately, pretest_trend can be set equal to a significance level between 0 and 1 (e.g. pretest_trend = .05, as suggested by Tarlow, 2017). In this case, the first step involves a significance test for the slope of the baseline trend based on Kendall's rank correlation. If the slope is not significantly different from zero, then no baseline trend adjustment is made and Tau-BC is set equal to Tau. If the slope is significantly different from zero, then in the second step, the outcomes are adjusted for baseline trend using Theil-Sen regression and, in the third step, the residuals from Theil-Sen regression are used to calculate the Tau (non-overlap) index.

Note that the standard error formulas are based on the standard errors for Tau (non-overlap) and they do not account for the additional uncertainty due to use of the baseline trend correction (nor to the pre-test for statistical significance of baseline trend, if used).

Value

A list containing the estimate, standard error, and/or confidence interval.

References

Tarlow, K. R. (2017). An improved rank correlation effect size statistic for single-case designs: Baseline corrected Tau. Behavior modification, 41(4), 427-467. doi:doi: 10.1177/0145445516676750

Examples

1
2
3
A <- c(20, 20, 26, 25, 22, 23)
B <- c(28, 25, 24, 27, 30, 30, 29)
Tau_BC(A_data = A, B_data = B)

SingleCaseES documentation built on Sept. 30, 2021, 5:09 p.m.