design: Generates Design matrix

Description Usage Arguments Author(s) See Also Examples

View source: R/design.R

Description

This function generates a user an (n-1)x(p+2) design matrix for their data and own choice of AR(p) model. This can be used directly with cpt.reg() but is unnecessary for cpt.ar() as it will be generated internally.

Usage

1
design(data,p=1)

Arguments

data

A vector, ts object or matrix containing the data within which you wish to find a changepoint. If data is a matrix, each row is considered a separate dataset.

p

User specifies the order of the AR(p) model they specifically wish to plug in to cpt.reg.

Author(s)

Andrew Connell

See Also

cpt.reg

Examples

1
2
3
data <- c(rnorm(100,1,1),rnorm(100,50,1))
dataAR1 <- design(data,1)
dataAR2 <- design(data,2)

AndrewC1998/changepoint-new documentation built on Sept. 5, 2019, 6:37 a.m.