summaryS4VGAMextra: Summary methods for Vector Generalized Time Series Models

summaryS4VGAMextra-methodsR Documentation

Summary methods for Vector Generalized Time Series Models

Description

S4 summary methods for models fitted with time series family functions from VGAMextra.

These function are all methods for objects of class vglm with signature vgltsmff-class.

Details

Implementation of vector generalized time series (TS) family functions (vgltsmff) in VGAMextra is entirely based on the structure of family functions of class vglmff-class from VGAM. More precisely, vgltsmff family functions can be created by calls of the form new("vgltsmff",...), following the structure vglmff-class. See vglmff-class for additional details.

In this line, specific S4 dispatching methods are currently implemented at VGAM to show (or plot) essential statistical information about the model fitted.

For the generic summary, specifically, S4 methods for objects with signature vgtsff are incorporated in VGAMextra to display supplementary analyses commonly required by TS practicioners. That is, additional information to the default output shown by summaryvglm for family functions at VGAM, as follows:

a) The standard errors, which are computed from the asymptotic distribution of the MLE estimates, unlike the asymptotic approach (z-value) from VGAM.

b) Checks on stationarity and/or invertibility for autoregressive (AR), moving average (MA), and autoregressive moving-average (ARMA) models via the polynomial roots.

c) The AIC, AICC and BIC criteria for model identification.

Notice that, for intercept-only models in the 'vglm' context, the asypmtotic distribution of the estimates, either conditional or unconditional, will coincide with the theoretical distributions as long as n increases. In particular, for the AR(p) process, the MLEs and the Yule-Walker estimates will concur asymptotically.

Where covariates or parameter constraints are involved, the standard errors for the estimates from time series family functions at VGAMextra are calculated from the predicted values allocated in the slot @predictors, when summary(...) is called. In this case, the conditional mean, \textrm{E}[\eta_j | \textbf{x}] x ], is considered as the estimate, where:

\eta_j = \sum_{k = 1}^{p} \beta_{(j)k} \times x_{k},

for j = 1, \ldots, M.

Value

An object of class summary.vglm printed by specific methods defined at VGAMextra for objects with signature vgltsff-class.

Note

As for the intercept, notice that this is called drift-term at ARXff and ARMAXff, whilst it is refered as intercept in MAXff. This parameter is also estimated by TS family functions in VGAMextra. In the MA model, particularly, it is the mean of the process.

The drift-term, denoted as \mu^*, is linearly linked to the mean, \mu, of the AR and ARMA processes in turn, as follows:

\mu \to \frac{\mu^{*} }{1 - \sum \theta_i}.

Here, \theta_i are the AR coefficients. Hence, the standard error for the drift-term is accordingly computed based on the asymptotic distribution of the mean. More precisely, the relation

V(\mu^{*}) = (1 - \sum \theta_i)^{-2} \times \frac{\sigma_{\varepsilon}^2 }{n},

is considered, where \sigma_{\varepsilon}^2 is the variance of the random errors.

Finally, the AIC, AICC and BIC criteria are computed of the well-known expressions

AIC = (-2) \times Log-likelihood + 2 \times k

AICC = AIC + \frac{2~k~(k + 1)}{n - k - 1}

and

BIC = (-2) \times Log-likelihood + k~\times~ln(n)

with k denoting the number of parameters.

Author(s)

V. Miranda and T.W. Yee.

References

Woodward, H., Gray, H. and Elliot A. (2012) Applied Time Series Analysis. Taylor & Francis/CRC, Florida, USA.

See Also

vgtsff-class, summaryvlgm, ARXff, MAXff, ARMAXff, vglm.

Examples



#------------------------------------------------------------------------#
# Fitting a simple Moving Average model to compare with arima().
#------------------------------------------------------------------------#
set.seed(0628)
nn    <- 300
theta <- c(0.2, -0.37)  # Autoregressive coefficients
phi   <- c(0.25)        # MA coefficients.
mu    <- c(1.5, 0.85)   # Mean (not drift) of the MA process.
x2 <- runif(nn)

tsd1 <- mu[1]/(1 - sum(theta)) + 
                  arima.sim(n = nn, 
                            model = list(order = c(2, 0, 0), 
                                          ar = theta),
                            sd = exp(1.5))
tsd2 <- mu[2]/(1 - sum(theta)) + 
                  arima.sim(n = nn, 
                            model = list(order = c(2, 0, 1),
                                         ar = theta, ma = phi), 
                            sd = exp(1 + 2 * x2))

tsdata <- data.frame(TS1 = tsd1, TS2 = tsd2, x2 = x2)
head(tsdata)

    ###    An ARIMA(2, 0, 0) model, that is an AR(2) model    ###
    
#fit1 <- vglm(TS1 ~ 1, 
#             ARIMAXff(order = c(2, 0, 0), var.arg = FALSE, type.EIM = "exact"), 
#             data = tsdata,  crit = "log", trace = TRUE)

fit1 <- vglm(TS1 ~ 1, 
             ARXff(order = 2, var.arg = FALSE, type.EIM = "exact"), 
             data = tsdata,  crit = "log", trace = TRUE)
m.coe <- Coef(fit1)

## Using arima to compare to summary(vgtsff)
summary(fit1)
arima(tsdata$TS1, order = c(2, 0, 0)) ## Similar SE's than VGAMextra.


m.coe[1] / (1 - sum(m.coe[-(1:2)]))  # THIS IS SIMILAR TO THE INTERCEPT 
                                     # ESTIMATED BY arima(): 1.1898

    ###    An ARIMA(2, 0, 1) models, that is an ARMA(2, 1)     ###
    ###   The errors standard deviation is a function of 'x2'  ###

### NOTICE: ARIMA and ARMA use the "identitylink" for coefficients ###
#fit2 <- vglm(TS2 ~ x2, 
#             ARMAXff(order = c(2, 1), var.arg = FALSE, type.EIM = "exact",
#                     zero = NULL), 
#            # constraints = list('x2' = rbind(0, 1, 0, 0, 0)),
#             data = tsdata,  crit = "loglikelihood", trace = TRUE)

#m.coe <- coef(fit2)
#coef(fit2, matrix = TRUE)

## Compare summary(vglm) to arima().
#summary(fit2)
#arima(tsdata$TS2, order = c(2, 0, 1))




VGAMextra documentation built on Nov. 2, 2023, 5:59 p.m.