Learn R Programming

scan (version 0.53)

overlap: Overlap indices for single-case data

Description

The overlap function provides the most common overlap indices for single-case data and some additional statistics.

Usage

overlap(data, dvar, pvar, mvar, decreasing = FALSE, phases = c(1, 2))

overlapSC(...)

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.

mvar

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

decreasing

If you expect data to be lower in the B phase, set decreasing = TRUE. Default is decreasing = FALSE.

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").

...

Further arguments passed to the function.

Value

overlap

A data frame consisting of the following indices for each single-case for all cases: PND, PEM, PET, NAP, PAND, Tau-U (A vs. B - Trend A), Diff_mean, Diff_trend, SMD, Hedges-g.

phases.A

Selection for A phase.

phases.B

Selection for B phase.

design

Phase design.

Details

See corresponding functions of PND, PEM, PET, NAP, PAND for calculation. Tau_U reports "A vs. B + Trend B - Trend A". Base_Tau is baseline corrected tau (correction applied when autocorrelation in phase A is significant). Diff_mean is the mean difference. Diff_trend is the difference in the regression estimation of the dependent variable on measurement-time ( x ~ mt) for each phase. SMD is the mean difference divided by the standardd eviation of phase A. Hedges_g is the mean difference divided by the pooled standard deviation [sqrt(((nA - 1) * sdA^2 + (nB - 1) * sdB^2) / (nA + nB - 2) )] with a hedges correction applied [(* (1 - (3 / (4 * n - 9) ) )].

See Also

Other overlap functions: corrected_tau(), nap(), pand(), pem(), pet(), pnd(), tau_u()

Examples

Run this code
# NOT RUN {
## Display overlap indices for one single-case
overlap(Huitema2000, decreasing = TRUE)

## Display overlap indices for six single-cases
overlap(GruenkeWilbert2014)

## Combining phases for analyszing designs with more than two phases   
overlap(exampleA1B1A2B2, phases = list(c("A1","A2"), c("B1","B2")))

# }

Run the code above in your browser using DataLab