Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stability

Structural stability of a VAR(p)


Description

Computes an empirical fluctuation process according to a specified method from the generalised fluctuation test framework. The test utilises the function efp() and its methods from package ‘strucchange’.

Usage

## Default S3 method:
stability(x, type = c("OLS-CUSUM", "Rec-CUSUM",
"Rec-MOSUM", "OLS-MOSUM", "RE", "ME", "Score-CUSUM", "Score-MOSUM",
"fluctuation"), h = 0.15, dynamic = FALSE, rescale = TRUE, ...)
## S3 method for class 'varest'
stability(x, type = c("OLS-CUSUM", "Rec-CUSUM",
"Rec-MOSUM", "OLS-MOSUM", "RE", "ME", "Score-CUSUM", "Score-MOSUM",
"fluctuation"), h = 0.15, dynamic = FALSE, rescale = TRUE, ...)

Arguments

x

Object of class ‘varest’; generated by VAR().

type

Specifies which type of fluctuation process will be computed, the default is ‘OLS-CUSUM’. For details see: efp.

h

A numeric from interval (0,1) sepcifying the bandwidth. Determins the size of the data window relative to sample size (for ‘MOSUM’ and ‘ME’ processes only).

dynamic

Logical. If ‘TRUE’ the lagged observations are included as a regressor.

rescale

Logical. If ‘TRUE’ the estimates will be standardized by the regressor matrix of the corresponding subsample; if ‘FALSE’ the whole regressor matrix will be used. (only if ‘type’ is either ‘RE’ or ‘E’).

...

Ellipsis, is passed to strucchange::sctest(), as default.

Details

For details, please refer to documentation efp.

Value

A list with class attribute ‘varstabil’ holding the following elements:

stability

A list with objects of class ‘efp’; length is equal to the dimension of the VAR.

names

Character vector containing the names of the endogenous variables.

K

An integer of the VAR dimension.

Author(s)

Bernhard Pfaff

References

Zeileis, A., F. Leisch, K. Hornik and C. Kleiber (2002), strucchange: An R Package for Testing for Structural Change in Linear Regression Models, Journal of Statistical Software, 7(2): 1-38, http://www.jstatsoft.org/v07/i02/

and see the references provided in the reference section of efp, too.

See Also

Examples

data(Canada)
var.2c <- VAR(Canada, p = 2, type = "const")
var.2c.stabil <- stability(var.2c, type = "OLS-CUSUM")
var.2c.stabil
## Not run: 
plot(var.2c.stabil)

## End(Not run)

vars

VAR Modelling

v1.5-3
GPL (>= 2)
Authors
Bernhard Pfaff [aut, cre], Matthieu Stigler [ctb]
Initial release
2018-08-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.