Description Usage Arguments Value References Examples
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.
1 | movingEnergyDistance(x, y, l = NULL, tau = NULL, alpha = 1)
|
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') |
a list of energy distnce values for pairs of adjacent data segments of length tau (moving-frame construction)
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.