This a sampler interface to convert user-friendly data into the necessary format to feed the immunity estimation model.
Usage
imuGAP(
observations,
populations,
locations,
imugap_opts = imugap_options(),
stan_opts = stan_options()
)Arguments
- observations
a
[data.frame()], the observed data, with at least three columns:an
obs_idcolumn; any type, as long as unique, non-NAa `positive“ column; non-negative integers, the observed number of vaccinated individuals
a
sample_ncolumn; positive integers, the number of individuals sampled, must be greater than or equal to "positive"optionally, a
censoredcolumn; numeric, NA (uncensored) or 1 (right-censored); if not present, will be assumed NA
- populations
a
[data.frame()], the the observation meta data, with columnsobs_id, any type; the observation the row concerns (i.e. id shared with an observations data object)`loc_id“, any type; the location the row concerns (i.e. id shared with a locations data object)
dose, a non-zero, positive integer (1, 2, ...); what dose row concernscohort, a positive integer; the cohort at the location row concernsage, a positive integer; the age of that cohort row concernsweight, a numeric, (0, 1); the relative contribution of this row to an observation Note that multiple rows may concern the same observation, meaning that the populations from different cohorts, locations, and ages may be pooled in an observation
- locations
a
[data.frame()], with columnsloc_idandparent_id, of the same type. See Details for restrictions.- imugap_opts
options for the
imuGAPmodel- stan_opts
passed to
rstan::sampling(e.g.iter,chains).
Value
An object of class stanfit returned by rstan::sampling