View source: R/CointegrationOfTwoTS.R
CointegrationOfTwoTS | R Documentation |
If TS1 and TS2 are cointegrated then a linear combination must be stationary.
CointegrationOfTwoTS(TS1, TS2, alpha = 1, type='c',PlotIt = TRUE)
TS1 |
[1:n] vector of data |
TS2 |
[1:n] vector of data |
alpha |
linear factor, do not search for right alpha with PLS statistics. |
type |
a character string describing the type of |
PlotIt |
TRUE: plot distribution analysis of |
"In the econometric literature, a time series zt is said to be an integrated process of order 1, that is, an I(1) process, if (1−B)zt is stationary and invertible. In general, a univariate time series zt is an I(d) process if (1−B)dzt is stationary and invertible, where d > 0. The order d is referred to as the order of integration or the multiplicity of a unit root. A stationary and invertible time series is said to be an I(0) process." [Tsay, 2013, p.295]
In short, A cointegration relationship exists between two (or more) time series when there is a long-term balance between two (or more) transient (integrated) variables. Cointegration is applied to detrend time series (non-stationary time series). It represents an alternative to a detrending through the computation of differences (DiffFilter
). Trend correction is often proposed in order to avoid false regressions.
List of
CointegrationOrder1 |
CointegrationOrder1=TS1-alpha*TS2 |
adf_fUnitRoots |
Check cointegration with |
adg_tseries |
Check cointegration with |
regression analysis fails if ts are non stationary
the simplest unit-root nonstationary time series is the univariate random walk
linear combination of several unit-root nonstationary time series can become a stationary series [Box and Tiao, 1977].
Michael Thrun
[Tsay, 2013] Tsay, Ruey S: Multivariate time series analysis: with R and financial applications, John Wiley & Sons, 2013.
[Box and Tiao, 1977] Box, G. E. P. and Tiao, G. C. (1977): A canonical analysis of multiple time serie, Biometrika, 64, pp. 355–366, 1977.
po.test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.