Learn R Programming

scan (version 0.20)

pet: Percent exceeding the trend

Description

The pet function provides the percentage of phase B data points exceeding the prediction based on the phase A trend. A binomial test against a 50/50 distribution is computed. Furthermore, the percentage of phase B data points exceeding the upper (or lower) 95 percent confidence interval of the predicted progress is computed.

Usage

pet(data, ci = 0.95, decreasing = FALSE)

Arguments

data

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

decreasing

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

ci

Width of the confidence interval. Default is ci = .95.

Value

PET

Percent exceeding the trend.

PET.ci

Percent exceeding the upper / lower 95%-CI boundary.

p

P value of Binomial Test.

ci.percent

Width of confidence interval in percent.

se.factors

Standard error.

N

Number of cases.

decreasing

Logical argument from function call (see Arguments above).

case.names

Assigned name of single-case.

See Also

overlapSC, describeSC, nap, pand, pem, pnd

Examples

Run this code
# NOT RUN {
## Calculate the PET and use a 99%-CI for the additional calculation
dat <- rSC(5, d.slope = 0.2)
pet(dat, ci = .99)
# }

Run the code above in your browser using DataLab