Description Usage Arguments Value Examples
This function allows testing the presence of the change point by computing P value using corresponding asymptotic distribution of test statistic.
1 | changetest(VARCP)
|
VARCP |
A list of class "VARCP" |
changetest returns a list of class "htest" with following items
method |
Character string which states type of the input test statistic |
data.name |
Character string which states name of the input argument |
p.value |
P value estimated using asymptotic distribution of the test statistic |
estimate |
Maximal value of the test statistic |
statistic |
Time index of estimated changepoint |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Simulation of time series of length 200
phi <- matrix(c(0.2,-0.6,0.3,1),2,2)
sig <- matrix(c(4,0.8,0.8,1),2,2)
data <- VARMAsim(200, arlags = 1, phi = phi, sigma = sig)
model <- VAR(data[["series"]], p = 1)
## Tests estimation
CUSUM <- statcomp(model, type = "CUSUM")
DET <- statcomp(model, type = "DET")
## Computing test P values
changetest(CUSUM)
changetest(DET)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.