Package overview

geostan-package geostan

The geostan R package.

Spatial data

edges()

Edge list

get_shp()

Download shapefiles

n_nbs()

Count neighbors in a connectivity matrix

row_standardize()

Row-standardize a matrix; safe for zero row-sums.

shape2mat()

Create spatial and space-time connectivity matrices

sim_sar()

Simulate spatially autocorrelated data

Spatial autocorrelation

aple()

Spatial autocorrelation estimator

expected_mc()

Expected value of the residual Moran coefficient

gr()

The Geary Ratio

lg()

Local Geary

lisa()

Local Moran's I

mc()

The Moran coefficient (Moran's I)

moran_plot()

Moran scatter plot

n_eff()

Effective sample size

sp_diag()

Visual displays of spatial data and spatial models

Model prep

make_EV()

Prepare data for spatial filtering

prep_car_data()

Prepare data for the CAR model

prep_car_data2()

Prepare data for the CAR model: raster analysis

prep_icar_data()

Prepare data for ICAR models

prep_me_data()

Prepare data for spatial measurement error models

prep_sar_data()

Prepare data for a simultaneous autoregressive (SAR) model

prep_sar_data2()

Prepare data for SAR model: raster analysis

Spatial models

stan_car()

Conditional autoregressive (CAR) models

stan_esf()

Spatial filtering

stan_glm()

Generalized linear models

stan_icar()

Intrinsic autoregressive models

stan_sar()

Simultaneous autoregressive (SAR) models

Methods and diagnostics

log_lik()

Extract log-likelihood

predict(<geostan_fit>)

Predict method for geostan_fit models

print(<geostan_fit>) plot(<geostan_fit>)

print or plot a fitted geostan model

residuals(<geostan_fit>) fitted(<geostan_fit>) spatial()

Extract residuals, fitted values, or the spatial trend

as.matrix(<geostan_fit>) as.data.frame(<geostan_fit>) as.array(<geostan_fit>)

Extract samples from a fitted model

sp_diag()

Visual displays of spatial data and spatial models

spill() impacts() print(<impacts_slm>)

Spillover/diffusion effects for spatial lag models

me_diag()

Measurement error model diagnostics

posterior_predict()

Sample from the posterior predictive distribution

uniform() normal() student_t() gamma2() hs()

Prior distributions

waic() dic()

Model comparison

Miscellaneous

auto_gaussian()

Auto-Gaussian family for CAR models

eigen_grid()

Eigenvalues of a spatial weights matrix: for spatial regression with raster data

se_log()

Standard error of log(x)

Data

georgia

Georgia all-cause, sex-specific mortality, ages 55-64, years 2014-2018

sentencing

Florida state prison sentencing counts by county, 1905-1910