monitorStationarity {cointmonitoR} | R Documentation |
This procedure is able to monitor a one-dimensional vector for level or
trend stationarity and returns the corresponding break point, if available.
It is based on parameter estimation on a pre-break "calibration" period
at the beginning of the sample that is known or assumed to be free of
structural change and can be specified exactly via the m
argument
(see Details for further information).
monitorStationarity(x, m = 0.25, trend = FALSE, kernel = c("ba", "pa", "qs", "tr"), bandwidth = c("and", "nw"), signif.level = 0.05, return.stats = TRUE, return.input = TRUE, check = TRUE, ...)
x |
[ |
m |
[ |
trend |
[ |
kernel |
[ |
bandwidth |
[ |
signif.level |
[ |
return.stats |
[ |
return.input |
[ |
check |
[ |
... |
Arguments passed to |
The calibration period can be specified by setting the argument m
to the number of its last observation.
The corresponding fraction of the data's length will be calculated
automatically. Alternatively you can set m
directly to the fitting
fraction value. Attention: The calibration period may become smaller than
intended: The last observation is calculated as floor(m * N)
(with N
= length of x
).
The kernel that is used for calculating the long-run variance can be one of the following:
"ba"
: Bartlett kernel
"pa"
: Parzen kernel
"qs"
: Quadratic Spectral kernel
"tr"
: Truncated kernel
[cointmonitoR
] object with components:
Hsm
[numeric(1)
]value of the test statistic
time
[numeric(1)
]detected time of structural break
p.value
[numeric(1)
]estimated p-value of the test (between 0.01 and 0.1)
cv
[numeric(1)
]critical value of the test
sig
[numeric(1)
]significance level used for the test
trend
[character(1)
]trend model ("level" or "trend")
name
[character(1)
]name(s) of data
m
[list(2)
]list with components:
$m.frac
[numeric(1)
]: calibration period (fraction)
$m.index
[numeric(1)
]: calibration period (length)
kernel
[character(1)
]kernel function
bandwidth
[list(2)
]$name
[character(1)
]: bandwidth function (name)
$number
[numeric(1)
]: bandwidth
statistics
[numeric
]values of test statistics with the same length as data, but NA
during calibration period (available if return.stats = TRUE
)
input
[numeric
| matrix
| data.frame
]copy of input data (available if return.stats = TRUE
)
Wagner, M. and D. Wied (2015): "Monitoring Stationarity and Cointegration," Discussion Paper, DOI:10.2139/ssrn.2624657.
Other cointmonitoR: monitorCointegration
,
plot.cointmonitoR
,
print.cointmonitoR
set.seed(1909) x <- rnorm(200) x2 <- c(x[1:100], cumsum(x[101:200]) / 2) # Specify the calibration period # as fraction of the total length of x: monitorStationarity(x, m = 0.25) monitorStationarity(x2, m = 0.465) # Specify the calibration period # by setting its last observation exactly: monitorStationarity(x, m = 50) monitorStationarity(x2, m = 93)