ARIMAX.errors.ff {VGAMextra} | R Documentation |
A VLTSMff for dynamic regression. Estimates regression models with order–(p, d, q) ARIMA errors by maximum likelihood.
ARIMAX.errors.ff(order = c(1, 1, 1), zero = "var", # optionally, "mean". order.trend = 0, include.int = TRUE, diffCovs = TRUE, xLag = 0, include.currentX = TRUE, lvar = "loge", lmean = "identitylink")
order |
The usual (p, d, q) integer vector as in, e.g.,
|
zero |
What linear predictor is modelled as intercept–only?
See |
order.trend |
Non–negative integer. Allows to incorporate a polynomial
trend of order |
include.int |
Logical. Should an intercept (int) be included in
the model for y[t]? Default is
|
diffCovs |
Logical. If |
xLag |
Integer. If entered, the covariates, say
x[t] are laggeg
(up to order |
include.currentX |
Logical. If |
lvar, lmean |
Link functions applied to conditional mean and the variance.
Same as |
The generalized linear regression model with ARIMA errors is another subclass of VGLTSMs (Miranda and Yee, 2018).
For a univariate time series, say y[t], and a p–dimensional vector of covariates x[t] covariates, the model described by this VGLTSM family function is
y[t] = β^T x_t + u[t],
u[t] = θ[1] u[t - 1] + … +θ[p] u[t - p] + z[t] + φ[1] z[t - 1] + … +φ[q] u[t - q].
The first entry in x_t equals 1, allowing
an intercept, for every $t$. Set
include.int = FALSE
to set this to zero,
dimissing the intercept.
Also, if diffCovs = TRUE
, then the differences up to order
d
of the set
x[t] are embedded in the model
for y[t].
If xLag
> 0, the lagged values up to order
xLag
of the covariates are also included.
The random disturbances z[t] are by default handled as N(0, σ[z]^2). Then, denoting Φ[t] as the history of the process (x[t + 1], u[t]) up to time t, yields
E(y[t] | Φ[t - 1]) = β^T x[t] + θ[1] u[t - 1] + … +θ[p] u[t - p] + φ[1] z[t - 1] + … +φ[q] u[t - q].
Denoting μ[t] = E(y[t] | Φ[t - 1]), the default linear predictor for this VGLTSM family function is
η = (μ[t], log σ[t]^2)^T.
An object of class "vglmff"
(see vglmff-class
)
to be used by VGLM/VGAM modelling functions, e.g.,
vglm
or vgam
.
If d = 0
in order
, then ARIMAX.errors.ff
will perform as ARIMAXff
.
Victor Miranda
ARIMAXff
,
CommonVGAMffArguments
,
uninormal
,
vglm
.
### Estimate a regression model with ARMA(1, 1) errors. ## Covariates are included up to lag 1. set.seed(20171123) nn <- 250 x2 <- rnorm(nn) # One covariate sigma2 <- exp(1.15); theta1 <- 0.5; phi1 <- 0.27 # True coefficients beta0 <- 1.25; beta1 <- 0.25; beta2 <- 0.5 y <- numeric(nn) u <- numeric(nn) z <- numeric(nn) u[1] <- rnorm(1) z[1] <- rnorm(1, 0, sqrt(sigma2)) for(ii in 2:nn) { z[ii] <- rnorm(1, 0, sqrt(sigma2)) u[ii] <- theta1 * u[ii - 1] + phi1 * z[ii - 1] + z[ii] y[ii] <- beta0 + beta1 * x2[ii] + beta2 * x2[ii - 1] + u[ii] } # Remove warm-up values. x2 <- x2[-c(1:100)] y <- y[-c(1:100)] plot(ts(y), lty = 2, col = "blue", type = "b") abline(h = 0, lty = 2) ## Fit the model. ARIMAX.reg.fit <- vglm(y ~ x2, ARIMAX.errors.ff(order = c(1, 0, 1), xLag = 1), data = data.frame(y = y, x2 = x2), trace = TRUE) coef(ARIMAX.reg.fit, matrix = TRUE) summary(ARIMAX.reg.fit, HD = FALSE) # Compare to arima() # arima() can't handle lagged values of 'x2' by default, but these # may entered at argument 'xreg'. arima(y, order = c(1, 0, 1), xreg = cbind(x2, c(0, x2[-150])))