Description Usage Arguments Details Value Control Arguments Author(s) References See Also Examples
The function fits a spatial autoregressive model with spatial ARCH residuals using the maximum-likelihood approach. All parameters are jointly estimated. In addition, external regressor may be included in the mean equation.
1 2 |
formula |
an object of class " |
B |
|
W |
|
type |
type of spatial ARCH model to be fitted for the error process (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) |
eigen_v |
eigen values of B (optional) |
control |
list of control variables for iterative maximization of the log-likelihood |
For type = "spARCH"
, the functions fits a simple spatial autoregressive model with spatial ARCH residuals, i.e.,
Y = λ B Y + X β + h^(1/2) ε
with
h = α + ρ * W * Y^2.
The distribution of the error term is assumed to be Gaussian.
If type = "log-ARCH"
, a spatial log-ARCH process is estimated for the error term, i.e.,
ln h = α + ρ * W * g_b(ε) .
The function g_b is defined as
g_b(ε) = (ln|h(ε_1)|^b, ..., ln|h(ε_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.SARspARCH
.
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
function provides several descriptive plots. For numerical maximization of the log-likelihood, the function uses the algorithm of solnp
from the package Rsolnp
.
A spARCH object with the following elements is returned:
coefficients |
Parameter estimates α and ρ. |
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 h. |
y |
Vector of observations (input values). |
h |
Chosen type (input). |
B |
Spatial weight matrix (input). |
W |
Spatial weight matrix (input). |
regressors |
Are regressors included? |
AR |
Is an autoregressive term in the mean equation? |
X |
Matrix of regressors if |
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).
Philipp Otto potto@europa-uni.de
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145. arXiv:1609.00711
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | require("spdep")
rho <- 0.5
alpha <- 1
lambda <- 0.5
d <- 5
n <- d^2
nblist <- cell2nb(d, d, type = "queen")
W <- nb2mat(nblist)
B <- W
X <- cbind(rep(1, n), rnorm(n))
beta <- c(5, 2)
y <- solve(diag(n) - lambda * B) %*%
(sim.spARCH(n = n, rho = rho, alpha = alpha, W = W, type = "log-spARCH") + X %*% beta)
y <- as.vector(y)
out <- qml.SARspARCH(y ~ X[,2], B = B, W = W, type = "log-spARCH")
summary(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.