Title: | Spatial ARCH and GARCH Models (spGARCH) |
---|---|
Description: | A collection of functions to deal with spatial and spatiotemporal autoregressive conditional heteroscedasticity (spatial ARCH and GARCH models) by Otto, Schmid, Garthoff (2018, Spatial Statistics) <arXiv:1609.00711>: simulation of spatial ARCH-type processes (spARCH, exponential spARCH, complex spARCH); quasi-maximum-likelihood estimation of the parameters of spARCH models and spatial autoregressive models with spARCH disturbances, diagnostic checks, visualizations. |
Authors: | Philipp Otto [cre, aut] |
Maintainer: | Philipp Otto <[email protected]> |
License: | GPL |
Version: | 0.2.2 |
Built: | 2024-12-11 07:19:55 UTC |
Source: | CRAN |
The function extracts the log-likelihood of a spatial ARCH model.
## S3 method for class 'spARCH' extractAIC(fit, scale, k = 2, ...)
## S3 method for class 'spARCH' extractAIC(fit, scale, k = 2, ...)
fit |
|
scale |
currently unused for |
k |
parameter specifying the weight for the penalizing term. |
... |
Other arguments. |
Numeric vector of length 2 is returned. The first element specify the edf
(equivalent degree of freedom) and the Akaike information criterion is returned as second element.
Philipp Otto [email protected]
The function extracts the fitted values of a spatial ARCH model.
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' fitted(object, ...)
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' fitted(object, ...)
object |
|
... |
Other arguments. |
Fitted values extracted from the object
.
Philipp Otto [email protected]
residuals.spARCH
, logLik.spARCH
.
The function extracts the log-likelihood of a spatial ARCH model.
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' logLik(object, ...)
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' logLik(object, ...)
object |
|
... |
Other arguments. |
logLik
object is returned.
Philipp Otto [email protected]
residuals.spARCH
, fitted.spARCH
.
The function depicts several descriptive statistics of the residuals of a fitted spatial ARCH model.
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' plot(x, which = c(1:3), ask, ..., qqline = TRUE)
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' plot(x, which = c(1:3), ask, ..., qqline = TRUE)
x |
spARCH object generated by |
which |
Index number of plot to be returned. |
ask |
if |
... |
Other arguments. |
qqline |
A line of the normal distribution for comparison is added to the Q-Q plot, if |
The function plot.spARCH
provides several descriptive plots to analyze the residuals of a fitted spatial ARCH model, namely (1) Moran's plot for residuals, (2) Moran's plot for squared residuals, and (3) Normal Q-Q plot for standardized residuals.
For details of moran.plot
see: help(moran.plot)
.
Philipp Otto [email protected]
The dataset contains logarithmic incidence rates from the National Cancer Institute and Centers for Disease, Control and Prevention (State Cancer Profiles) and factor loadings of a set of covariates. The incidence rates are 5-year averages from 2008 to 2012 in several southeastern states (Arkansas, Louisiana, Mississippi, Tennessee, North and South Carolina, Georgia, Alabama, and Florida). Missing values were imputed by spatial averaging.
data("prostate_cancer")
data("prostate_cancer")
A list with three entries:
data
a data frame; see below for details
B
a numeric matrix; weighting matrix B to run the example
W
a numeric matrix; weighting matrix W to run the example
The data frame contains 755 observations of the following 12 variables.
log_incidence_rates
a numeric vector; logarithmic incidence rates of prostate cancer
F_1
a numeric vector; scores of factor 1 (environment: fine atmospheric particles and aerosols)
F_2
a numeric vector; scores of factor 2 (environment: particulate matter)
F_3
a numeric vector; scores of factor 3 (weather: solar radiation and temperature)
F_4
a numeric vector; scores of factor 4 (weather: temperature differences)
F_5
a numeric vector; scores of factor 5 (behavior: smoking)
F_6
a numeric vector; scores of factor 6 (behavior: drinking)
F_7
a numeric vector; scores of factor 7 (behavior: preventive health care)
F_8
a numeric vector; scores of factor 8 (behavior: physical activity)
F_9
a numeric vector; scores of factor 9 (health: overweight)
F_10
a numeric vector; scores of factor 10 (health: cholesterol and blood pressure)
PSA_test
a numeric vector; percentage of positive results for a prostate-specific antigen (PSA) test
https://statecancerprofiles.cancer.gov/index.html
National Cancer Institute, Centers for Disease, Control and Prevention
https://statecancerprofiles.cancer.gov/map/map.withimage.php?99&001&001&00&0&02&0&1&10 Otto, P. (2019). spGARCH: An R-Package for Spatial and Spatiotemporal ARCH and GARCH models To appear: The R Journal URL: https://arxiv.org/abs/1812.01871
data(prostate_cancer) ## Not run: # Estimation (long running example) formula <- "log_incidence_rates ~ F_2 + F_10" out <- qml.SARspARCH(formula, B = prostate_cancer$B, W = prostate_cancer$W, type = "spARCH", data = prostate_cancer$data) # Summary summary(out) ## End(Not run)
data(prostate_cancer) ## Not run: # Estimation (long running example) formula <- "log_incidence_rates ~ F_2 + F_10" out <- qml.SARspARCH(formula, B = prostate_cancer$B, W = prostate_cancer$W, type = "spARCH", data = prostate_cancer$data) # Summary summary(out) ## End(Not run)
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.
qml.SARspARCH(formula, B, W, type = "spARCH", data = NULL, b = 2, start = NULL, eigen_v = NULL, control = list())
qml.SARspARCH(formula, B, W, type = "spARCH", data = NULL, b = 2, start = NULL, eigen_v = NULL, control = list())
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.,
with
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.,
The function is defined as
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 |
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). |
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 [email protected]
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145. arXiv:1609.00711
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)
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)
The function fits a spatial ARCH model using the maximum-likelihood approach. In addition, external regressor may be included in the mean equation.
qml.spARCH(formula, W, type = "spARCH", data = NULL, b = 2, start = NULL, control = list())
qml.spARCH(formula, W, type = "spARCH", data = NULL, b = 2, start = NULL, control = list())
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 |
For type = "spARCH"
, the functions fits a simple spatial ARCH model with one spatial lag, i.e.,
with
The distribution of the error term is assumed to be Gaussian.
If type = "log-spARCH"
, a spatial log-ARCH process is estimated, i.e.,
The function is defined as
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
.
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 |
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 [email protected]
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145. arXiv:1609.00711
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)
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)
The function extracts the residuals of a fitted spatial ARCH model.
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' residuals(object, ...)
## S3 method for class 'spARCH' ## S3 method for class 'spARCH' residuals(object, ...)
object |
|
... |
Other arguments. |
The function extracts the residuals of a fitted spatial ARCH model.
Philipp Otto [email protected]
residuals.spARCH
, fitted.spARCH
.
The function generates n
random numbers of a spatial ARCH process for given parameters and weighting schemes.
sim.spARCH(n = dim(W)[1], rho, alpha, W, b = 2, type = "spARCH", control = list())
sim.spARCH(n = dim(W)[1], rho, alpha, W, b = 2, type = "spARCH", control = list())
n |
number of observations. If |
rho |
spatial dependence parameter rho |
alpha |
unconditional variance level alpha |
W |
|
b |
parameter |
type |
type of simulated spARCH process (see details) |
control |
list of control arguments (see below) |
The function simulates n
observations of a spatial ARCH process, i.e.,
where is a spatial White Noise process. The definition of
depends on the chosen
type
. The following types are available.
type = "spARCH"
- simulates from a truncated normal distribution on the interval
, such that
with
Note that the normal distribution is not trunctated (), if
is a strictly triangular matrix, as it is ensured that
. Generally, it is sufficient that if there exists a permutation such that
is strictly triangular. In this case, the process is called oriented spARCH process.
type = "log-spARCH"
- simulates a logarithmic spARCH process (log-spARCH), i.e.,
For the log-spARCH process, the errors follow a standard normal distribution. The function is given by
type = "complex-spARCH"
- allows for complex solutions of with
The errors follow a standard normal distribution.
The functions returns a vector .
seed
- positive integer to initialize the random number generator (RNG), default value is a random integer in
silent
- if FALSE
, current random seed is reported
triangular
- if TRUE
, is a triangular matrix and there are no checks to verify this assumption (default
FALSE
)
Philipp Otto [email protected]
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145. arXiv:1609.00711
require("spdep") # 1st example ############## # parameters rho <- 0.5 alpha <- 1 d <- 2 nblist <- cell2nb(d, d, type = "queen") W <- nb2mat(nblist) # simulation Y <- sim.spARCH(rho = rho, alpha = alpha, W = W, type = "log-spARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2])) # 2nd example ############## # two spatial weighting matrices W_1 and W_2 # h = alpha + rho_1 W_1 Y^2 + rho_2 W_2 Y^2 W_1 <- W nblist <- cell2nb(d, d, type = "rook") W_2 <- nb2mat(nblist) rho_1 <- 0.3 rho_2 <- 0.7 W <- rho_1 * W_1 + rho_2 * W_2 rho <- 1 Y <- sim.spARCH(n = d^2, rho = rho, alpha = alpha, W = W, type = "log-spARCH") image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))
require("spdep") # 1st example ############## # parameters rho <- 0.5 alpha <- 1 d <- 2 nblist <- cell2nb(d, d, type = "queen") W <- nb2mat(nblist) # simulation Y <- sim.spARCH(rho = rho, alpha = alpha, W = W, type = "log-spARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2])) # 2nd example ############## # two spatial weighting matrices W_1 and W_2 # h = alpha + rho_1 W_1 Y^2 + rho_2 W_2 Y^2 W_1 <- W nblist <- cell2nb(d, d, type = "rook") W_2 <- nb2mat(nblist) rho_1 <- 0.3 rho_2 <- 0.7 W <- rho_1 * W_1 + rho_2 * W_2 rho <- 1 Y <- sim.spARCH(n = d^2, rho = rho, alpha = alpha, W = W, type = "log-spARCH") image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))
The function generates n
random numbers of a spatial GARCH process for given parameters and weighting schemes.
sim.spGARCH(n = dim(W1)[1], rho, lambda, alpha, W1, W2, b = 2, zeta = 0.5, theta = 0.5, type = "spGARCH", control = list())
sim.spGARCH(n = dim(W1)[1], rho, lambda, alpha, W1, W2, b = 2, zeta = 0.5, theta = 0.5, type = "spGARCH", control = list())
n |
number of observations. If |
rho |
spatial dependence parameter rho |
lambda |
spatial dependence parameter lambda |
alpha |
unconditional variance level alpha |
W1 |
|
W2 |
|
b |
parameter |
zeta |
parameter |
theta |
parameter |
type |
type of simulated spGARCH process (see details) |
control |
list of control arguments (see below) |
The function simulates n
observations of a spatial GARCH process, i.e.,
where is a spatial White Noise process. The definition of
depends on the chosen
type
. The following types are available.
type = "spGARCH"
- simulates from a truncated normal distribution on the interval
, such that
with
Note that the normal distribution is not trunctated (), if
is a strictly triangular matrix, as it is ensured that
. Generally, it is sufficient that if there exists a permutation such that
is strictly triangular. In this case, the process is called oriented spGARCH process.
type = "e-spGARCH"
- simulates an exponential spARCH process (e-spGARCH), i.e.,
For the e-spGARCH process, the errors follow a standard normal distribution. The function is given by
type = "log-spGARCH"
- simulates a logarithmic spARCH process (log-spGARCH), i.e.,
For the log-spGARCH process, the errors follow a standard normal distribution. The function is given by
type = "complex-spGARCH"
- allows for complex solutions of with
The errors follow a standard normal distribution.
The functions returns a vector .
seed
- positive integer to initialize the random number generator (RNG), default value is a random integer in
silent
- if FALSE
, current random seed is reported
triangular
- if TRUE
, is a triangular matrix and there are no checks to verify this assumption (default
FALSE
)
Philipp Otto [email protected]
Philipp Otto, Wolfgang Schmid (2019). Spatial GARCH Models - A Unified Approach. arXiv:1908.08320
require("spdep") # 1st example (spatial GARCH) ############## # parameters rho <- 0.5 lambda <- 0.3 alpha <- 1 d <- 5 nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix W_1 <- nb2mat(nblist) W_2 <- W_1 # simulation Y <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha, W1 = W_1, W2 = W_2, type = "spGARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2])) # 2nd example (exponential spatial GARCH) ############## # parameters rho <- 0.5 lambda <- 0.3 alpha <- 1 zeta <- 0.5 theta <- 0.5 d <- 5 nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix W_1 <- nb2mat(nblist) W_2 <- W_1 # simulation Y <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha, W1 = W_1, W2 = W_2, zeta = zeta, theta = 0.5, type = "e-spGARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))
require("spdep") # 1st example (spatial GARCH) ############## # parameters rho <- 0.5 lambda <- 0.3 alpha <- 1 d <- 5 nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix W_1 <- nb2mat(nblist) W_2 <- W_1 # simulation Y <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha, W1 = W_1, W2 = W_2, type = "spGARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2])) # 2nd example (exponential spatial GARCH) ############## # parameters rho <- 0.5 lambda <- 0.3 alpha <- 1 zeta <- 0.5 theta <- 0.5 d <- 5 nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix W_1 <- nb2mat(nblist) W_2 <- W_1 # simulation Y <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha, W1 = W_1, W2 = W_2, zeta = zeta, theta = 0.5, type = "e-spGARCH") # visualization image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))
The spARCH
class is a class generated by the estimation functions qml.spARCH
or qml.SARspARCH
comprising the results of the quasi-maximum-likelihood estimation.
Several generic methods for summarizing the results are available:
plot(spARCH_object)
plot.spARCH
- Descriptive plots for residuals of a fitted spatial ARCH model
summary(spARCH_object)
summary.spARCH
- The function returns a summary of the model fit of a spatial ARCH model
fitted(spARCH_object)
fitted.spARCH
- The function extracts the fitted values of a spatial ARCH model.
A collection of functions for simulating and fitting spatial autoregressive conditional heteroscedasticity (spARCH) processes are provided.
The functions sim.spARCH
and sim.spGARCH
are the main function for simulating spARCH and spGARCH processes, respectively. Via the argument type
several types of spatial ARCH and GARCH can be simulated, e.g., exponential spARCH models, spARCH for oriented processes, or spARCH processes with truncated error support. For details, refer the paper Otto, Schmid, and Garthoff (2018) published in Spatial Statistics.
Moreover, the package provides function for fitting spARCH models. Basically, there are two functions to fit these kind of model: qml.spARCH
and qml.SARspARCH
. First, spARCH models can be fitted by qml.spARCH
.
Philipp Otto [email protected]
Philipp Otto, Wolfgang Schmid, Robert Garthoff (2018). Generalised Spatial and Spatiotemporal Autoregressive Conditional Heteroscedasticity. Spatial Statistics 26, pp. 125-145.
The function returns a summary of the model fit of a spatial ARCH model (qml.spARCH
or qml.SARspARCH
).
## S3 method for class 'spARCH' summary(object, ...) ## S3 method for class 'summary.spARCH' print(x, digits = max(5, .Options$digits - 3), signif.stars = TRUE, ...) ## S3 method for class 'spARCH' print(x, ...)
## S3 method for class 'spARCH' summary(object, ...) ## S3 method for class 'summary.spARCH' print(x, digits = max(5, .Options$digits - 3), signif.stars = TRUE, ...) ## S3 method for class 'spARCH' print(x, ...)
object |
spARCH object generated by |
digits |
The number of significant digits to be printed. |
signif.stars |
Logical variable. If TRUE, significance stars are printed for each coefficient. |
x |
spARCH object of |
... |
further arguments passed to or from other methods |
The function summary.spARCH
returns an spARCH object with all results (coefficients, residuals, diagnostic checks etc.). If the returned object is printed, a detailed summary of the model fit is returned.
The function returns the input spARCH object, plus
Coef |
a matrix with columns for the estimated coefficients, their standard error, t-statistics and corresponding (two-sided, asymptotic) p-values. |
AIC |
Akaike information criterion |
BIC |
Bayesian Schwarz information criterion |
moran_res |
Test on spatial spatial autocorrelation of the residuals (based on Morans I, |
moran_sq_res |
Test on spatial spatial autocorrelation of the squared residuals (based on Morans I, |
For further details about the Moran's I test see moran.test
.
Philipp Otto [email protected]
The model fitting functions qml.spARCH
and qml.SARspARCH
. Function coef
will extract the matrix of coefficients with standard errors, t-statistics and p-values.
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)
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)