Skip to main content
Research article - Peer-reviewed, 2015

Fitting Conditional and Simultaneous Autoregressive Spatial Models in hglm

Alam, Moudud; Rönnegård, Lars; Shen, Xia


We present a new version (>= 2.0) of the hglm package for fitting hierarchical generalized linear models (HGLMs) with spatially correlated random effects. CAR() and SAR() families for conditional and simultaneous autoregressive random effects were implemented. Eigen decomposition of the matrix describing the spatial structure (e.g., the neighborhood matrix) was used to transform the CAR/SAR random effects into an independent, but heteroscedastic, Gaussian random effect. A linear predictor is fitted for the random effect variance to estimate the parameters in the CAR and SAR models. This gives a computationally efficient algorithm for moderately sized problems.

Published in

The R journal
2015, Volume: 7, number: 2, pages: 5-18