spaMM (version 2.2.0)

adjacency: Fitting autoregressive models

Description

The only autoregressive model (AR) currently implemented is the adjacency model (a conditional AR, i.e., CAR). Implementation of further models (in particular, of simultaneous AR, i.e., SAR) is to be expected in the future. Efficient algorithms have been widely discussed in particular in the econometric literature (e.g., LeSage and Pace 2009). The fastest method in spaMM for large data sets is implemented in the fitme function. For small data sets (as in the example below), HLCor may be fastest. It is suggested to use fitme generally unless one has a large number of small data sets to analyze. For LMMs, corrHLfit(*,HLmethod="PQL/L") can be quite fast (but does not return an ML or REML fit).

Arguments

Details

For large data sest, fitme selects methods that exploits the sparsity of the precision matrix of the random effects.

A call to HLCor uses the spectral decomposition of the adjacency matrix as further detailed below. This is fast for small datasets but fitme may be preferable otherwise.

A call to corrHLfit with the additional argument init.HLfit=list(rho=0) should be equivalent in speed and result to the HLCor call.

A call to corrHLfit without this argument does not use the spectral decomposition. It performs a generic numerical maximization of the likelihood (or restricted likelihood) as function of the correlation parameter \(\rho\). The ML fits by corrHLfit and HLCor should be practically equivalent. The REML fits should slightly differ from each other, due to the fact that the REML approximation for GLMMs does not maximize a single likelihood function.

In the adjacency model, the covariance matrix of random effects u can be described as \(\lambda\)(I\(-\rho\) W\()^{-1}\) where W is the (symmetric) adjacency matrix. HLCor uses the spectral decomposition of the adjacency matrix, written as boldW=VDV' where D is a diagonal matrix of eigenvalues \(d_i\). The covariance of V'u is \(\lambda\)(I\(-\rho\) D\()^{-1}\), which is a diagonal matrix with elements \(\lambda_i\)=\(\lambda\)/(1\(-\rho d_i\)). Hence \(1/\lambda_i\) is in the linear predictor form \(\alpha\)+\(\beta d_i\) This can be used to fit \(\lambda\) and \(\rho\) efficiently. If HLCor is used, the results are reported as the coefficients \(\alpha\) ((Intercept)) and \(\beta\) (adjd) of the predictor for \(1/\lambda_i\), in addition to the resulting values of \(\rho\) and of the common \(\lambda\) factor.

References

LeSage, J., Pace, R.K. (2009) Introduction to Spatial Econometrics. Chapman & Hall/CRC.

Examples

Run this code
# NOT RUN {
data(scotlip)
# CAR by Laplace with 'outer' estimation of rho
if (spaMM.getOption("example_maxtime")>0.7) {          
  corrHLfit(cases~I(prop.ag/10) +adjacency(1|gridcode)+offset(log(expec)),
          adjMatrix=Nmatrix,family=poisson(),data=scotlip,HLmethod="ML") 
}
if (spaMM.getOption("example_maxtime")>2.1) {          
  fitme(cases~I(prop.ag/10) +adjacency(1|gridcode)+offset(log(expec)),
          adjMatrix=Nmatrix,family=poisson(),data=scotlip) 
}

# CAR by Laplace with 'inner' estimation of rho
HLCor(cases~I(prop.ag/10) +adjacency(1|gridcode)+offset(log(expec)),
          adjMatrix=Nmatrix,family=poisson(),data=scotlip,HLmethod="ML")
# }

Run the code above in your browser using DataCamp Workspace