run_until_converged: Run a sampler until it has converged, or until the maximum...

Description Usage Arguments Value Author(s)

View source: R/run_until_converged.R

Description

Run a sampler until it has converged, or until the maximum number of attempts has been exceeded

Usage

1
2
run_until_converged(sampler, model_type, inits, nchains, max_attempts,
  save_progress, threshold, keep_samples, autofit)

Arguments

sampler

A named list containing fun (the function to call as the sampler), init_fun (the function used to generate the initial conditions), and args (a named list of arguments for the sampler function).

model_type

Type of model. Must be either "multi" or "hier".

inits

Named list of initial conditions.

nchains

Number of chains (default = 3)

max_attempts

Maximum number of attempts for autofit (default = 10)

save_progress

If not NULL, path to file in which to save current

threshold

Gelman PSRF threshold for convergence (default = 1.15)

keep_samples

Maximum number of samples to keep in results (default = Inf)

autofit

(Logical) If TRUE, keep re-trying until model has converged (default = FALSE)

Value

List of sample chains. Each sample chain is a named list of sampled parameters.

Author(s)

Alexey Shiklomanov


ashiklom/mvtraits documentation built on Sept. 4, 2019, 7:43 a.m.