Learn R Programming

scan (version 0.20)

autocorrSC: Autocorrelation for single-case data

Description

The autocorrSC function calculates autocorrelations within phase A, phase B and the complete single-case data set (AB).

Usage

autocorrSC(data, lag.max = 3)

Arguments

data

A single-case data frame or a list of single-case data frames. See makeSCDF to learn about this format.

lag.max

The lag up to which autocorrelations will be computed. Default is lag.max = 3.

Value

autocorr

A data frame containing separate autocorrelations of phase A, phase B and the complete data (for each single-case). If lag.max exceeds the length of a phase minus one, NA is returned for this cell.

See Also

trendSC, plm, hplm

Examples

Run this code
# NOT RUN {
## Compute autocorrelations for a list of four single-cases with max.lag = 2
autocorrSC(Huber2014, lag.max = 2)
# }

Run the code above in your browser using DataLab