Description Usage Arguments Value
View source: R/init_settings.R
Initialize a bookkeeping list of MCMC settings.
1 2 3 4 5 6 7 8 | init_settings(epimodel, niter, configs_to_redraw,
config_replacement = FALSE, preferential_sampling = NULL,
init_popsize = NULL, compartment_dist = NULL,
save_params_every = 1, save_configs_every = niter%/%100, kernel,
post_init_params = NULL, cov_mtx = NULL,
to_estimation_scale = NULL, from_estimation_scale = NULL,
analytic_eigen = NULL, ecctmc_method = "mr", seed = NULL,
time_limit = NULL)
|
epimodel |
epimodel object |
niter |
number of iterations/parameter updates for which to run the sampler. |
configs_to_redraw |
number of subject level trajectories to sample between parameter updates. |
preferential_sampling |
vector with two elements, given in the following order. First the size of the group to be preferentially sampled. Second, the probability that a subject is sampled from the preferential group. The IDs of subjects to be preferentially sampled will be selected uniformly at random from among subjects with non-constant paths when the collection of subject paths is initialized. If the size of the preferentially sampled group is larger than the number of subjects with non-constant paths, additional subject IDs will be added by selecting subejct IDs uniformly at random from among the other subjects. |
init_popsize |
population size with which to initialize the epidemic. |
compartment_dist |
distribution according to which to place the remainder of the subjects. required if init_popsize is not equal to the true population size. Supplied as a named vector of probabilities. |
save_params_every |
thin parameter updates by saving every k-th draw, defaults to 1. |
save_configs_every |
thin configurations by saving the current configuration after every k-th parameter update. |
kernel |
transition kernel for parameters, provided as a list of
transition functions. Each function should take as an argument only the
epimodel list. The kernels should be self-contained, in particular making
any necessary transformations of parameters and calculating prior
probabilities as needed. Each kernel function should include a call to
|
post_init_params |
a vector of initial parameter values to be used after an acceptable initial configuration has been simulated. |
cov_mtx |
covariance matrix to be used in the transition kernels. |
to_estimation_scale |
list of functions for transforming model
parameters to the scale on which new parameters should be proposed. List
element names should correspond to exactly to the parameter names given in
|
from_estimation_scale |
list of functions for transforming model
parameters from the a scale on which new parameters are proposed to the
scale used to evaluate the process likelihood. List element names should
correspond to exactly to the parameter names given in |
analytic_eigen |
optional. If NULL, eigenvalues, eigenvectors, and inverses of the eigenvector matrices of each rate transition rate matrix are computed numerically. If one of "SIR", or "SEIR", the eigen decompositions will be computed analytically. It is up to the user to ensure that the rate matrices are structured in the appropriate form (see vignettes for examples). |
ecctmc_method |
Method for sampling the exact times of state transition. Defaults to "mr" for modified rejection sampling. May also be specified as "unif" for uniformization. |
seed |
optional seed value. A random seed is generated and saved if none is supplied. |
time_limit |
optional maximum time budget for the MCMC, checked every time the parameters are saved. Should be provided as a diffitme object with units in hours. |
bookkeeping list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.