Package: geostan 0.8.1

Connor Donegan

geostan: Bayesian Spatial Analysis

For spatial data analysis; provides exploratory spatial analysis tools, spatial regression, spatial econometric, and disease mapping models, model diagnostics, and special methods for inference with small area survey data (e.g., the America Community Survey (ACS)) and censored population health monitoring data. Models are pre-specified using the Stan programming language, a platform for Bayesian inference using Markov chain Monte Carlo (MCMC). References: Carpenter et al. (2017) <doi:10.18637/jss.v076.i01>; Donegan (2021) <doi:10.31219/osf.io/3ey65>; Donegan (2022) <doi:10.21105/joss.04716>; Donegan, Chun and Hughes (2020) <doi:10.1016/j.spasta.2020.100450>; Donegan, Chun and Griffith (2021) <doi:10.3390/ijerph18136856>; Morris et al. (2019) <doi:10.1016/j.sste.2019.100301>.

Authors:Connor Donegan [aut, cre], Mitzi Morris [ctb], Amy Tims [ctb]

geostan_0.8.1.tar.gz
geostan_0.8.1.tar.gz(r-4.5-noble)geostan_0.8.1.tar.gz(r-4.4-noble)
geostan.pdf |geostan.html
geostan/json (API)
NEWS

# Install 'geostan' in R:
install.packages('geostan', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/connordonegan/geostan/issues

Pkgdown site:https://connordonegan.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • georgia - Georgia all-cause, sex-specific mortality, ages 55-64, years 2014-2018
  • sentencing - Florida state prison sentencing counts by county, 1905-1910

cpp

4.94 score 41 scripts 748 downloads 43 exports 70 dependencies

Last updated 22 days agofrom:7a0f3c7313. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 05 2024
R-4.5-linux-x86_64NOTEDec 05 2024

Exports:apleauto_gaussiandicedgeseigen_gridexpected_mcgamma2get_shpgrhsimpactslglisalog_likmake_EVmcme_diagmoran_plotn_effn_nbsnormalposterior_predictprep_car_dataprep_car_data2prep_icar_dataprep_me_dataprep_sar_dataprep_sar_data2row_standardizese_logshape2matsim_sarsp_diagspatialspillstan_carstan_esfstan_glmstan_icarstan_sarstudent_tuniformwaic

Dependencies:abindbackportsBHbootcallrcheckmateclassclassIntclicolorspaceDBIdeldirdescdistributionale1071fansifarvergenericsggplot2gluegridExtragtableinlineisobandKernSmoothlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxproxypsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolss2scalessfsignsspspDataspdepStanHeaderstensorAtibbletruncnormunitsutf8vctrsviridisLitewithrwk

Custom spatial models with RStan and geostan

Rendered fromcustom-spatial-models.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-11-16
Started: 2023-10-05

Exploratory spatial data analysis

Rendered frommeasuring-sa.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-11-16
Started: 2022-02-09

Raster regression

Rendered fromraster-regression.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-12-04
Started: 2023-05-29

Spatial analysis with geostan

Rendered fromspatial-analysis.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-12-04
Started: 2024-11-16

Spatial measurement error models

Rendered fromspatial-me-models.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-11-16
Started: 2022-02-09

Spatial weights matrix

Rendered fromspatial-weights-matrix.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-06-05
Started: 2024-05-11

Readme and manuals

Help Manual

Help pageTopics
The geostan R package.geostan-package geostan
Spatial autocorrelation estimatoraple
Extract samples from a fitted modelas.array.geostan_fit as.data.frame.geostan_fit as.matrix.geostan_fit
Auto-Gaussian family for CAR modelsauto_gaussian
Edge listedges
Eigenvalues of a spatial weights matrix: for spatial regression with raster dataeigen_grid
Expected value of the residual Moran coefficientexpected_mc
Georgia all-cause, sex-specific mortality, ages 55-64, years 2014-2018georgia
Download shapefilesget_shp
The Geary Ratiogr
Local Gearylg
Local Moran's Ilisa
Extract log-likelihoodlog_lik log_lik.geostan_fit
Prepare data for spatial filteringmake_EV
The Moran coefficient (Moran's I)mc
Measurement error model diagnosticsme_diag
Moran scatter plotmoran_plot
Effective sample sizen_eff
Count neighbors in a connectivity matrixn_nbs
Sample from the posterior predictive distributionposterior_predict
Predict method for 'geostan_fit' modelspredict.geostan_fit
Prepare data for the CAR modelprep_car_data
Prepare data for the CAR model: raster analysisprep_car_data2
Prepare data for ICAR modelsprep_icar_data
Prepare data for spatial measurement error modelsprep_me_data
Prepare data for a simultaneous autoregressive (SAR) modelprep_sar_data
Prepare data for SAR model: raster analysisprep_sar_data2
print or plot a fitted geostan modelplot.geostan_fit print.geostan_fit
Prior distributionsgamma2 hs normal priors student_t uniform
Extract residuals, fitted values, or the spatial trendfitted.geostan_fit residuals.geostan_fit spatial spatial.geostan_fit
Row-standardize a matrix; safe for zero row-sums.row_standardize
Standard error of log(x)se_log
Florida state prison sentencing counts by county, 1905-1910sentencing
Create spatial and space-time connectivity matricesshape2mat
Simulate spatially autocorrelated datasim_sar
Visual displays of spatial data and spatial modelssp_diag sp_diag.geostan_fit sp_diag.numeric
Spillover/diffusion effects for spatial lag modelsimpacts print.impacts_slm spill
Conditional autoregressive (CAR) modelsstan_car
Spatial filteringstan_esf
Generalized linear modelsstan_glm
Intrinsic autoregressive modelsstan_icar
Simultaneous autoregressive (SAR) modelsstan_sar
Model comparisondic waic