movingEnergyDistance: Moving energy distance

Description Usage Arguments Value References Examples

Description

Estimates energy distance \insertCiterizzo-szekely10changedetection for each point starting from tau+1 to T-tau, where T is a data length. In these terms, energy distance for a point means energy distance between the dataset containing tau observations to the left and the dataset containing tau observations to the right of the original point. Hence, we are considering a so-called 'moving frame' of length 2tau. The resulting array shows how the energy distance behaves along the period to analyze.

Usage

1
movingEnergyDistance(x, y, l = NULL, tau = NULL, 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

l

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

tau

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

alpha

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

Value

a list of energy distnce values for pairs of adjacent data segments of length tau (moving-frame construction)

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

med <- movingEnergyDistance(x=as.data.frame(x),
                            y=as.data.frame(y))

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