View source: R/checkTS.VGAMextra.R
checkTS.VGAMextra  R Documentation 
checkTS.VGAMextra
computes the polynomial roots as per
transfer operator in Vector
Generalized Time Series Family Functions in VGAMextra
checkTS.VGAMextra(thetaEst = NULL,
tsclass = c("AR", "MA"),
chOrder = 1,
NofS = 1,
retmod = TRUE,
pRoots = TRUE)
thetaEst 
A vector of coefficients. Its lenght must be 
tsclass 
Character indicating the model class to be checked. Presently,
options 
chOrder 
Positive integer. The order of polynomial associated to the
underlying procees involved:
either $p$ or $q$, which apply for

NofS 
A positive integer denoting the number of Time Series to verify.
In the 
retmod 
Logical. If 
pRoots 
Logical. If 
Stationarity and/or Invertibility of time series (TS) are usually verified via the roots of the polynomial derived from the transfer operators.
In particular, checkTS.VGAMextra
computes such roots via
the coefficients estimated by vector generalized TS family functions
available in VGAMextra ( ARXff
, and
MAXff
).
Specifically, checkTS.VGAMextra
verifies whether the TS
analyzed via vglm
is stationary or
invertible, accordingly.
Note that an autoregressive process of orderp
[AR(p
)] with coefficients
\theta_{1}, \ldots, \theta_{p}
can be written in the form
\theta(B) Y_{t} = \varepsilon_{t},
where
\theta(B) = 1  \sum_{k = 1}^{p} \theta_{k} B^{k}
Here, \theta(B)
is referred to as
the transfer operator of the process, and
B^{k} Y_{t} = Y_{t  k},
,
for k = 0, 1, \ldots,p
, is the lagged singlefunction.
In general, an autoregressive process of orderp
is
stationary if the roots of
\theta(z) = 1  \theta_{1} z  \ldots  \theta_{q} z^q
lie outside the unit circle, i.e. z > 1
.
Similarly, a movingaverage process of orderq
can be formulated
(without loss of generality \mu = 0
)
Y_{t} = \psi(B) \varepsilon_{t},
where \psi(B)
is the transfer operator, given by
\psi(B) = 1 + \sum_{k = 1}^{q} \psi_{k} B^{k},
Note that \psi_{0} = 1
, and
B^{k} \varepsilon_{t} = \varepsilon{t  k}
.
Hence, a movingaverage process of orderq
[MA(q
)],
generally given by (note \mu = 0
)
Y_{t} = \phi_1 \varepsilon_{t  1} + \ldots +
\phi_q \varepsilon_{t  q} + \varepsilon_{t},
is invertible if all the roots of
\phi(B) = 1 + \phi_{1} B + \ldots + \phi_{q} B^q
lie outside the unit circle., i.e.m z > 1
.
Parallel arguments can be stated for autoregressive moving aberage processes (ARMA). See Box and Jenkins (1970) for further details.
A vector whose elements are the roots of polynomials inherited from transfer operators according to the process analyzed.
Alternatively, the modules of roots can by returned instead of merely roots
via the retmod
argument.
The argument thetaEst
manages the coefficients of the TS
model(s) in turn. Then, it must be NofS * chOrder
length,
where NofS
is the number of responses established in the
vglm
call.
Here the coefficients for each response must be sequentially groped.
A moving average process is always stationary (See Madsen (2007) for
further details). Consequently, the MAXff
in VGAMextra verifies (by default) only for invertibility.
To enable this option set nowarning = FALSE
in the
MAXff
call.
Similarly, ARXff
verifies whether the TS data
fitted is stationary, whereas ARMAXff()
verifies both properties.
For TS family functions in the VGLM/VGAM framework,
checkTS.VGAMextra
is called at the final iteration of Fisher scoring.
It means that the MLE estimates are actually evaluated to
verify whether the process is stationary or invertible.
If any root has module less than 1 + 1e5
, a warning
is displayed
for informative purposes.
Argument thetaEst
manages the parameters of the TS model
in turn.
Victor Miranda and T. W. Yee.
Box, G.E.P. and Jenkins, G.M. (1970) Time Series Analysis: Forecasting and Control. HoldenDay, San Francisco, USA.
Madsen, H (2007) Time Series Analysis. Chapman and Hall/CRC, Boca Raton, Florida, USA.
# A moving average process order3 with coeffs > c(2.4, 5.6, 0.83)
##
# This is NOT invertible !
##
MAcoeffs < c(2.4, 5.6, 0.83)
checkTS.VGAMextra(thetaEst = MAcoeffs,
tsclass = "MA",
chOrder = 3,
retmod = FALSE)
# AR process order3 with coeffs > c( 0.45, 0.45^2, 0.45^3 )
##
# This is stationary !
##
ARcoeffs < c( 0.45 , 0.45^2 , 0.45^3 )
checkTS.VGAMextra(thetaEst = ARcoeffs,
tsclass = "AR",
chOrder = 3,
retmod = TRUE,
pRoots = TRUE) # DEFAULT for 'pRoots'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.