These functions control lower level computational details of the imputation methods.
Usage
control_bayes(
warmup = 200,
thin = 50,
chains = 1,
init = ifelse(chains > 1, "random", "mmrm"),
seed = sample.int(.Machine$integer.max, 1),
...
)Arguments
- warmup
a numeric, the number of warmup iterations for the MCMC sampler.
- thin
a numeric, the thinning rate of the MCMC sampler.
- chains
a numeric, the number of chains to run in parallel.
- init
a character string, the method used to initialise the MCMC sampler, see the details.
- seed
a numeric, the seed used to initialise the MCMC sampler.
- ...
additional arguments to be passed to
rstan::sampling().
Details
Currently only the Bayesian imputation via method_bayes() uses a control function:
The
initargument can be set to"random"to randomly initialise the sampler withrstandefault values or to"mmrm"to initialise the sampler with the maximum likelihood estimate values of the MMRM.The
seedargument is used to set the seed for the MCMC sampler. By default, a random seed is generated, such that outside invocation of theset.seed()call can effectively set the seed.The samples are split across the chains, such that each chain produces
n_samples / chains(rounded up) samples. The total number of samples that will be returned across all chains isn_samplesas specified inmethod_bayes().Therefore, the additional parameters passed to
rstan::sampling()must not containn_samplesoriter. Instead, the number of samples must only be provided directly via then_samplesargument ofmethod_bayes(). Similarly, therefreshargument is also not allowed here, instead use thequietargument directly indraws().
Note
For full reproducibility of the imputation results, it is required to use a set.seed() call
before defining the control list, and calling the draws() function. It is not sufficient to
merely set the seed argument in the control list.
