Skip to contents

Space and time

areal_frame()
Build a spatial frame
areal_lattice()
A regular lattice frame
plot(<stareal_frame>)
Map a frame and its graph
time_frame()
Build a time frame
time_index()
Map dates to time steps

Data

areal_data()
Attach survey data to a frame
plot(<stareal_data>)
Plot survey data
simulate_areal()
Simulate survey data from the model

Fitting

fit_areal()
Fit the space-time areal model
trend()
A linear trend in time
areal_priors()
Priors for an areal model
mcmc_control()
Settings for the MCMC sampler
summary(<stareal_fit>)
Summarise a fit
diagnose()
Check convergence and mixing of a fit
plot(<stareal_fit>)
Trace plots of a fit
as_draws(<stareal_fit>) as_draws_array(<stareal_fit>) as_draws_df(<stareal_fit>) as_draws_matrix(<stareal_fit>) as_draws_list(<stareal_fit>) as_draws_rvars(<stareal_fit>)
Posterior draws of a fit

Prediction and checking

predict(<stareal_fit>)
Predict the full area-time surface from a fit
plot(<stareal_pred>)
Plot predictions
as.data.frame(<stareal_pred>)
Predictions as a data frame
st_as_sf(<stareal_pred>)
Predictions as polygons
crossval()
Cross-validate a fit
compare_cv()
Compare cross-validated models

Comparing models

loo(<stareal_fit>)
Approximate leave-one-out cross-validation of a fit
compare_models()
Compare models fitted to the same data

Example data

Drug-resistance surveys in the eight IGAD countries.

igad_crt76t
Surveys of the chloroquine-resistance marker crt K76T in IGAD countries

Package

stareal stareal-package
stareal: spatial-temporal areal estimation from survey data
reexports loo loo_compare
Objects exported from other packages