tauUSC: Tau-U for single-case data

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/tauUSC.R

Description

This function calculates indices of the Tau-U family as proposed by Parker et al. (2011).

Usage

1
2
3
4
5
6
7
8
tauUSC(
  data,
  dvar,
  pvar,
  ties.method = "omit",
  method = "complete",
  phases = c(1, 2)
)

Arguments

data

A single-case data frame. See scdf to learn about this format.

dvar

Character string with the name of the dependent variable. Defaults to the attributes in the scdf file.

pvar

Character string with the name of the phase variable. Defaults to the attributes in the scdf file.

ties.method

Defines how to handle ties. "omit" (default) excludes all ties from the calculation. "positive" counts all ties as positive comparisons, while "negative" counts them as negative comparisons.

method

"complete" (default) or "parker". The latter calculates the number of possible pairs as described in Parler et al. (2011) which might lead to tau-U values greater than 1.

phases

A vector of two characters or numbers indicating the two phases that should be compared. E.g., phases = c("A","C") or phases = c(2,4) for comparing the second to the fourth phase. Phases could be combined by providing a list with two elements. E.g., phases = list(A = c(1,3), B = c(2,4)) will compare phases 1 and 3 (as A) against 2 and 4 (as B). Default is phases = c("A","B").

Value

table

A data frame containing statistics from the Tau-U family, including: Pairs, positive and negative comparisons, S, and Tau

matrix

The matrix of comparisons used for calculating the statistics.

tau_u

Tau-U value.

Author(s)

Juergen Wilbert

References

Parker, R. I., Vannest, K. J., Davis, J. L., & Sauber, S. B. (2011). Combining Nonoverlap and Trend for Single-Case Research: Tau-U. Behavior Therapy, 42, 284-299.

See Also

Other overlap functions: corrected_tauSC(), nap(), overlapSC(), pand(), pem(), pet(), pnd()

Examples

1
2
3
4
5
6
7
8
9
## Calculate tau-U for the example from Parker et al. (2011)
bob <- scdf(c(2, 3, 5, 3, 4, 5, 5, 7, 6), B.start = 5)
tauUSC(bob)

## Calculate tau-U with ties counted as positive
tauUSC(Grosche2011$Eva, ties.method = "positive")

## Request tau-U for all single-cases fom the Grosche2011 data
tauUSC(Grosche2011)

scan documentation built on Feb. 12, 2021, 3:01 a.m.