monitorStationarity {cointmonitoR}R Documentation

Procedure for Monitoring Level and Trend Stationarity


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, ...)



[numeric | matrix | data.frame]
Data on which to apply the monitoring procedure. If matrix, it may have only one row or column, if data.frame just one column.


Length of calibration period as fraction of the data's length (between 0.1 and 0.9) or as number of observations (see Details).


Should an intercept and a linear trend be included? If FALSE (default), only an intercept is included.


The kernel function to use for calculating the long-run variance. Default is Bartlett kernel ("ba"), see Details for alternatives.


[character(1) | numeric(1)]
The bandwidth to use for calculating the long-run variance. Default is Andrews (1991) ("and"), an alternative is Newey West (1994) ("nw"). You can also set the bandwidth manually.


Level of significance (between 0.01 and 0.1). Detection time will be calculated only if the estimated p-value is smaller than signif.level. Default is 0.05.


Whether to return all test statistics. Default is TRUE.


Whether to return the input data, default is TRUE.


Wheather to check (and if necessary convert) the arguments. See checkVars for further information.


Arguments passed to getBandwidthNW (inter, weights), if bandwidth = "nw".


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:


[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)


See Also

Other cointmonitoR: monitorCointegration, plot.cointmonitoR, print.cointmonitoR


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)

[Package cointmonitoR version 0.1.0 Index]