Description Usage Arguments Value Examples

Computes test statistic value for each time point. Likelihood-ratio test (LRT), Cumulative sum test (CUSUM) and Darling-Erdös-type test (DET) statistics are supported.

1 |

`model` |
A list returned by VAR or VARMA functions from MTS package |

`type` |
A character string which determines type of the test statistic returned by the function, either "CUSUM", "LRT" or "DET". The default is "CUSUM" |

`trim` |
A number of time points on data edges for which test statistic is not computed |

statcomp returns a list of class "VARCP" with following items

`values` |
Named vector of values of selected test statistic, where name is time index for which statistic is computed |

`type` |
Character string which states type of the computed test statistic |

1 2 3 4 5 6 7 8 9 | ```
## 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")
LRT <- statcomp(model, type = "LRT", trim = 15)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.