maxEneryCPMv: Phase II Multiple Change Points Model for High Dimensional...

Description Usage Arguments Details Value Author(s) Examples

Description

This function is used for online detection of multiple change points based on energy divergence for high dimensional time series.

Usage

1
maxEneryCPMv(data1, wNr, permNr, alpha)

Arguments

data1

an N*d matrix, N is the number of observations and d the dimensions.

wNr

a scalar of warm-up.

permNr

a scalar of times of permutation.

alpha

a scalar of significant level

Details

The function returns ONLY ONE vector containing even number components, where the first half stands for detection time vector and the rest half stands for the vector of change time locations.

Value

result

a vector of locations of detection time in the first half, locations of change time in the second half.

Author(s)

Yafei Xu <yafei.xu@hu-berlin.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(MASS)

# simulate 300 length time series
simNr=300

# simulate 300 length 5 dimensonal standard Gaussian series
Sigma2 <- matrix(c(1,0,0,0,0,  0,1,0,0,0,   0,0,1,0,0,  0,0,0,1,0,  0,0,0,0,1),5,5)
Mean2=rep(1,5)
sim2=(mvrnorm(n = simNr, Mean2, Sigma2)) 

# simulate 300 length 5 dimensonal standard Gaussian series
Sigma3 <- matrix(c(1,0,0,0,0,  0,1,0,0,0,   0,0,1,0,0,  0,0,0,1,0,  0,0,0,0,1),5,5)
Mean3=rep(0,5)
sim3=(mvrnorm(n = simNr, Mean3, Sigma3))

# construct a data set of length equal to 90.
# first 20 points are from standard Gaussian. 
# second 30 points from a Gaussian with a mean shift with 555.
# last 40 points are from standard Gaussian.  
data1=sim6=rbind(sim2[1:20,],(sim3+555)[1:30,],sim2[1:40,])

# set warm-up number as 20, permutation 200 times, significant level 0.005
wNr=20
permNr=200
alpha=1/200
maxEnergyCPMv(data1,wNr,permNr,alpha)

YafeiXu/EnergyOnlineCPM documentation built on May 9, 2019, 11:59 p.m.