Description Usage Arguments Value References Examples
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.
1 2 |
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') |
A set of change locations indexes changes
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.