changes: A list of change locations occured in the structure having...

Description Usage Arguments Value References Examples

Description

The main function of the package which estimates a set of structural change points for a dataset following multivariate (or univariate) linear model.

We consider the following problem. Assume we have observations y_t\in{R}^q, x_t\in{R}^p over time t=1,...,N which follow linear model

y_t= x'_t{β}(t)+{ε}_t

where ε_t\in{R}^d stands for the model noise and β is a p\times d-dimensional piecewise-constant function, i.e. {β}(t)\in{R}^{p\times d} is a weight matrix for every t. A change point is defined as a time instant \hat{t} where β shifts. More precisely, a set of points separating sequential regimes is a set of change points of the model and the objective of detectChanges function is to find this set.

The approach is based on the splitting procedure NSA \insertCitegorskikh17changedetection and energy distance analysis \insertCiterizzo-szekely10changedetection.

Usage

1
2
changes(x, y, tau = NULL, l = NULL, R = 1000, pzero = 0.05,
  gamma = 0.5, alpha = 1)

Arguments

x

matrix of regressors with variables in columns and observations in rows

y

matrix of responses with variables in columns and observations in rows

tau

length of splitting periods (default: l*10, which is dictated by The general rule of thumb \insertCiteHarrellchangedetection)

l

approximate number of contributing variables (default: overall number of regressors)

R

number of bootstrap rounds (default: '1000')

pzero

trust level for bootstrap (default: '0.05')

gamma

tau reduction rate used in NSA (default: '0.5')

alpha

parameter for energy distance formula (default: '1')

Value

A set of change locations indexes changes.

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
T<-60
change<-35
x<-rnorm(n=T, m=0, sd=1)
e<-scale(rt(n=T,3), scale=FALSE)
y1<-5*x[1:(change-1)]+e[1:(change-1)]
y2<--2*x[change:T]+e[change:T]
y<-c(y1,y2)

changes(x=as.data.frame(x),
        y=as.data.frame(y),
        tau=20, R=100)

changedetection documentation built on June 17, 2019, 5:03 p.m.