Fitting of decay-adjusted spatio-temporal (DAST) model
dast.Rd
The function fits a decay-adjusted spatio-temporal (DAST) model using Monte Carlo maximum liklihood. The DAST model allows for the incorporation of the temporal decay in diease prevalence due to the impact of mass drug administration (MDA). The function requires the full MDA history as detailed in the arguments below.
Usage
dast(
formula,
data,
den = NULL,
survey_times,
mda_times,
int_mat,
penalty = NULL,
drop = NULL,
power_val,
crs = NULL,
convert_to_crs = NULL,
scale_to_km = TRUE,
control_mcmc = set_control_sim(),
par0 = NULL,
S_samples = NULL,
return_samples = TRUE,
messages = TRUE,
start_pars = list(beta = NULL, sigma2 = NULL, tau2 = NULL, phi = NULL, sigma2_re =
NULL, gamma = NULL, alpha = NULL)
)
Arguments
- formula
A model formula specifying the response variable and predictors.
- data
A `data.frame` or `sf` object containing the dataset.
- den
The denominator for binomial models.
- survey_times
The variable indicating the survey times.
- mda_times
A vector specifying the mass drug administration (MDA) times.
- int_mat
Intervention matrix specifying the timing and coverage of MDA; the dimension of the matrix must be
n * n_mda
, wheren
is the number of rows ofdata
andn_mda
is the length ofmda_times
.- penalty
Optional list specifying penalty functions for regularization, used in the estimation of the "drop" parameter
alpha
.- drop
Optional value used for fixing the "drop" parameter of the MDA impact function.
- power_val
Value expressing the power of the MDA impact function.
- crs
Optional coordinate reference system (CRS) for spatial data.
- convert_to_crs
CRS to which spatial data should be converted.
- scale_to_km
Logical; whether to scale distances to kilometers (default: `TRUE`).
- control_mcmc
A list of MCMC control parameters, typically from `set_control_sim()`.
- par0
Optional list of initial parameter values.
- S_samples
Number of posterior samples to retain.
- return_samples
Logical; whether to return posterior samples (default: `TRUE`).
- messages
Logical; whether to print messages (default: `TRUE`).
- start_pars
List of starting values for parameters.
Value
A list containing model estimates, posterior samples, and metadata.
A list containing:
- `y`: Response variable values. - `D`: Covariate matrix. - `coords`: Unique spatial coordinates. - `mda_times`: MDA time points. - `survey_times_data`: Survey time data. - `int_mat`: Intervention matrix. - `ID_coords`: Indices of spatial locations. - `re`: Random effects levels (if applicable). - `ID_re`: Indices of random effects (if applicable). - `power_val`: Power of the MDA impact function. - `fix_tau2`: Fixed tau-squared value (if applicable). - `fix_alpha`: Fixed alpha value (if applicable). - `formula`: Model formula. - `crs`: Coordinate reference system. - `scale_to_km`: Indicator of distance scaling. - `data_sf`: Processed spatial dataset. - `family`: Model family (e.g., "binomial"). - `kappa`: Smoothness parameter. - `units_m`: Denominator for binomial models. - `cov_offset`: Offset for covariates. - `call`: Function call. - `penalty`: Penalty function details (if applicable). - `posterior_samples`: Posterior samples if `return_samples = TRUE`.