changingModel: Changeable linear structure of the data with given change...

Description Usage Arguments Value Examples

Description

The function estimates a set of linear models within the given dataset splitted by the given change points. The models are calculated as L1 regression based on a set of valuable predictors selected by lasso estimator.

Usage

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

changes

a set of structural change points

l

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

Value

a set of linear models along with corresponding contributing variables indexes

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)

model <- changingModel(x=as.data.frame(x),
                       y=as.data.frame(y),
                       c(change))

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