qml.spARCH {spGARCH} | R Documentation |
Maximum-likelihood estimation of a spatial ARCH model
Description
The function fits a spatial ARCH model using the maximum-likelihood approach. In addition, external regressor may be included in the mean equation.
Usage
qml.spARCH(formula, W, type = "spARCH", data = NULL,
b = 2, start = NULL, control = list())
Arguments
formula |
an object of class " |
W |
|
type |
type of spatial ARCH model to be fitted (see Details) |
data |
an optional data frame, list or environment containing the variables in the model. If not found in data, the variables are taken from the working space. |
b |
parameter |
start |
vector of starting values for the numerical optimization of the log-likelihood (optional) |
control |
list of control variables for iterative maximization of the log-likelihood |
Details
For type = "spARCH"
, the functions fits a simple spatial ARCH model with one spatial lag, i.e.,
\boldsymbol{Y} = \mathbf{X} \boldsymbol{\beta} + \boldsymbol{h}^{1/2} \boldsymbol{\varepsilon}
with
\boldsymbol{h} = \alpha \boldsymbol{1}_n + \rho \mathbf{W} \boldsymbol{Y}^{(2)} \, .
The distribution of the error term is assumed to be Gaussian.
If type = "log-spARCH"
, a spatial log-ARCH process is estimated, i.e.,
\ln(\boldsymbol{h}) = \alpha \boldsymbol{1}_n + \rho \mathbf{W} g_b(\boldsymbol{\varepsilon}) \, .
The function g_b
is defined as
g_b(\boldsymbol{\varepsilon}) = (\ln|\varepsilon(\boldsymbol{s}_1)|^{b}, \ldots, \ln|\varepsilon(\boldsymbol{s}_n)|^{b})'
and the error term is also assumed to be Gaussian.
The modelling equation gan be specified as for lm
, i.e., as formula
object. A typical model has the form response ~ terms
where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response
. A terms specification of the form first + second
indicates all the terms in first together with all the terms in second with duplicates removed. A specification of the form first:second
indicates the set of terms obtained by taking the interactions of all terms in first with all terms in second. The specification first*second
indicates the cross of first and second. This is the same as first + second + first:second
. However, there is no offset
permitted for the qml.spARCH
.
For an intercept-only model, the formula
can be specified as response ~ 1
. In addition, it is possible to fit an intercept-free model with response ~ 0
or response ~ 0 + terms
.
To summarize the results of the model fit, use the generic function summary
. For analysis of the residuals, the generic plot
provides several descriptive plots. For numerical maximization of the log-likelihood, the function uses the algorithm of solnp
from the package Rsolnp
.
Value
A spARCH object with the following elements is returned:
coefficients |
Parameter estimates |
residuals |
Vector of residuals. |
fitted.values |
Fitted values. |
stderr |
Standard errors of the estimates (Cramer-Rao estimates). |
hessian |
Hessian matrix of the negative Log-Likelihood at the estimated minimum. |
LL |
Value of the Log-Likelihood at the estimated maximum. |
h |
Fitted vector |
y |
Vector of observations (input values). |
h |
Chosen type (input). |
W |
Spatial weight matrix (input). |
regressors |
Are regressors included? |
AR |
Is an autoregressive term in the mean equation? |
X |
Matrix of regressors if |
Control Arguments
see also: solnp
-
rho
- This is used as a penalty weighting scalar for infeasibility in the augmented objective function. The higher its value the more the weighting to bring the solution into the feasible region (default 1). However, very high values might lead to numerical ill conditioning or significantly slow down convergence. -
outer.iter
- Maximum number of major (outer) iterations (default 400). -
inner.iter
- Maximum number of minor (inner) iterations (default 800). -
delta
- Relative step size in forward difference evaluation (default 1.0e-7). -
tol
- Relative tolerance on feasibility and optimality (default 1e-8). -
trace
- The value of the objective function and the parameters is printed at every major iteration (default 1).
Author(s)
Philipp Otto potto@europa-uni.de
References
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145. arXiv:1609.00711
See Also
Examples
require("spdep")
# directional spatial ARCH process (W is triangular, 1:1 origin)
rho <- 0.5
alpha <- 1
d <- 5
n <- d^2
nblist <- cell2nb(d, d, type = "queen")
W <- nb2mat(nblist)
W[lower.tri(W)] <- 0
y <- sim.spARCH(n = n, rho = rho, alpha = alpha, W = W, type = "spARCH")
out <- qml.spARCH(y ~ 0, W = W, type = "spARCH")
summary(out)