changetest: Computes P value of estimated test statistic

Description Usage Arguments Value Examples

Description

This function allows testing the presence of the change point by computing P value using corresponding asymptotic distribution of test statistic.

Usage

1
changetest(VARCP)

Arguments

VARCP

A list of class "VARCP"

Value

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

Examples

 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)

MasimovR/VARCP documentation built on May 28, 2019, 1:48 p.m.