1\name{stability}
2
3\alias{stability}
4\alias{stability.default}
5\alias{stability.varest}
6\alias{print.varstabil}
7
8\title{Structural stability of a VAR(p)}
9
10\encoding{latin1}
11
12\description{
13  Computes an empirical fluctuation process according to a specified
14  method from the generalised fluctuation test framework. The test
15  utilises the function \command{efp()} and its methods from
16  package \sQuote{\code{strucchange}}.
17}
18
19\usage{
20\method{stability}{default}(x, type = c("OLS-CUSUM", "Rec-CUSUM",
21"Rec-MOSUM", "OLS-MOSUM", "RE", "ME", "Score-CUSUM", "Score-MOSUM",
22"fluctuation"), h = 0.15, dynamic = FALSE, rescale = TRUE, ...)
23\method{stability}{varest}(x, type = c("OLS-CUSUM", "Rec-CUSUM",
24"Rec-MOSUM", "OLS-MOSUM", "RE", "ME", "Score-CUSUM", "Score-MOSUM",
25"fluctuation"), h = 0.15, dynamic = FALSE, rescale = TRUE, ...)
26}
27
28\arguments{
29  \item{x}{Object of class \sQuote{\code{varest}}; generated by
30    \command{VAR()}.}
31  \item{type}{Specifies which type of fluctuation process will be
32    computed, the default is \sQuote{\code{OLS-CUSUM}}. For details see:
33    \code{\link[strucchange]{efp}}.}
34  \item{h}{A numeric from interval (0,1) sepcifying the
35    bandwidth. Determins the size of the data window relative to sample
36    size (for \sQuote{\code{MOSUM}} and \sQuote{\code{ME}} processes only).}
37  \item{dynamic}{Logical. If \sQuote{\code{TRUE}} the lagged
38    observations are included as a regressor.}
39  \item{rescale}{Logical. If \sQuote{\code{TRUE}} the estimates will be
40    standardized by the regressor matrix of the corresponding subsample;
41    if \sQuote{\code{FALSE}} the whole regressor matrix will be
42    used. (only if \sQuote{\code{type}} is either \sQuote{\code{RE}} or
43    \sQuote{\code{E}}).}
44  \item{...}{Ellipsis, is passed to \code{strucchange::sctest()}, as default.}
45}
46\details{
47  For details, please refer to documentation \code{\link[strucchange]{efp}}.
48}
49
50\value{
51  A list with class attribute \sQuote{\code{varstabil}} holding the
52  following elements:\cr
53
54  \item{stability}{A list with objects of class \sQuote{\code{efp}};
55    length is equal to the dimension of the VAR.}
56  \item{names}{Character vector containing the names of the endogenous
57    variables.}
58  \item{K}{An integer of the VAR dimension.}
59}
60
61\author{Bernhard Pfaff}
62
63\references{
64   Zeileis, A., F. Leisch, K. Hornik and C. Kleiber (2002), strucchange:
65   An R Package for Testing for Structural Change in Linear Regression
66   Models, \emph{Journal of Statistical Software}, \bold{7(2)}: 1-38,
67   \url{https://www.jstatsoft.org/v07/i02/}
68
69   and see the references provided in the reference section of
70   \code{\link[strucchange]{efp}}, too.
71}
72
73\seealso{
74  \code{\link{VAR}}, \code{\link{plot}}, \code{\link[strucchange]{efp}}
75}
76
77\examples{
78data(Canada)
79var.2c <- VAR(Canada, p = 2, type = "const")
80var.2c.stabil <- stability(var.2c, type = "OLS-CUSUM")
81var.2c.stabil
82\dontrun{
83plot(var.2c.stabil)
84}
85}
86
87\keyword{regression}
88\concept{VAR}
89\concept{Vector autoregressive model}
90\concept{Structural Stability}
91\concept{efp}
92\concept{Empirical Fluctuation Process}
93
94
95