qml.SARspARCH: Maximum-likelihood estimation of a spatial autoregressive...

Description Usage Arguments Details Value Control Arguments Author(s) References See Also Examples

View source: R/Estimation.R

Description

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.

Usage

1
2
qml.SARspARCH(formula, B, W, type = "spARCH", data = NULL,
              b = 2, start = NULL, eigen_v = NULL, control = list())

Arguments

formula

an object of class "formula"): a symbolic description of the model to be fitted. The details of model specification are given under "Details." y must be a numeric vector of length n (dimension of the weighting matrix)

B

n times n spatial weight matrix for the spatial autoregressive part

W

n times n spatial weight matrix for the spatial ARCH residuals

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 b for the E-spARCH model (type = "exp"), must be a (positive) natural number

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

Details

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.

Value

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? TRUE/FALSE

AR

Is an autoregressive term in the mean equation? TRUE/FALSE

X

Matrix of regressors if regressor = TRUE

Control Arguments

see also: solnp

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

solnp (package Rsolnp)

Examples

 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)

spGARCH documentation built on Sept. 2, 2020, 9:07 a.m.