GEESAR {spatemR} | R Documentation |
Generalized Estimating Equations with Spatial Autoregressive Components
Description
'GEESAR' estimates generalized estimating equations (GEE) incorporating spatial autoregressive (SAR) components. It extends GEE models to account for spatial dependence in the response variable.
Usage
GEESAR(
formula,
family = gaussian(),
weights = NULL,
data,
W,
start = NULL,
toler = 1e-04,
maxit = 200,
trace = FALSE
)
Arguments
formula |
A formula specifying the model structure (response ~ predictors). |
family |
A description of the error distribution and link function. Default is 'gaussian()'. |
weights |
Optional vector of prior weights. Must be positive. |
data |
A data frame containing the variables in the model. |
W |
A spatial weights matrix defining the spatial dependence structure. |
start |
Optional starting values for parameter estimation. |
toler |
Convergence tolerance for iterative optimization. Default is '1e-05'. |
maxit |
Maximum number of iterations for model fitting. Default is '50'. |
trace |
Logical; if 'TRUE', prints iteration details. Default is 'FALSE'. |
Details
The function estimates a spatially autoregressive GEE model by iteratively updating the spatial dependence parameter ('rho') and regression coefficients ('beta'). The estimation follows a quasi-likelihood approach using iterative weighted least squares (IWLS).
The function supports common GLM families ('gaussian', 'binomial', 'poisson', 'Gamma', 'inverse.gaussian') and their quasi-likelihood equivalents.
Value
A list of class '"GEESAR"' containing:
coefficients |
Estimated regression coefficients. |
rho |
Estimated spatial autoregressive parameter. |
fitted.values |
Predicted values from the model. |
linear.predictors |
Linear predictor values ('X * beta'). |
prior.weights |
Weights used in estimation. |
y |
Observed response values. |
formula |
Model formula. |
call |
Function call used to fit the model. |
data |
Data used in the model. |
converged |
Logical indicating whether the algorithm converged. |
logLik |
Quasi-log-likelihood of the fitted model. |
deviance |
Residual deviance. |
df.residual |
Residual degrees of freedom. |
phi |
Dispersion parameter estimate. |
CIC |
Corrected Information Criterion. |
RJC |
Robust Jackknife Correction. |
Source
https://doi.org/10.48550/arXiv.2412.00945
References
Cruz, N. A., Toloza-Delgado, J. D., & Melo, O. O. (2024). Generalized spatial autoregressive model. arXiv preprint arXiv:2412.00945.
See Also
Examples
library(spdep)
library(sp)
data(meuse)
sp::coordinates(meuse) <- ~x+y
W <- spdep::nb2mat(knn2nb(knearneigh(meuse, k=5)), style="W")
fit <- GEESAR(cadmium ~ dist + elev, family=poisson(), data=meuse, W=W)
summary_SAR(fit)