Sample blocks of a given size until either the estimated log marginal likelihood falls within a given confidence interval, there is sufficient confidence that the evidence model gamma = 1 is at most a certain quantity, or a certain number of blocks have been sampled.
stop_chain(
y,
blocks_remaining,
start_zs,
start_logit_omegas,
start_log_phis,
temperatures,
tolerance = 1,
confidence = 0.95,
simulations = 1000,
log_evidence_threshold = -Inf,
y_log_lik_t_equals_1_traces = matrix(ncol = length(temperatures), nrow = 0),
full_block_traces = list(),
verbose = FALSE,
...
)An object of class BeviMed.
Logical vector of case (TRUE) control (FALSE) status.
Maximum number of blocks left before termination.
Initial (logical) z-matrix.
Initial values of logit_omega (numeric vector - one value per chain).
Initial values of log_phi (numeric vector - one value per chain).
Numeric vector of temperatures of power posteriors. One chain will be created for each element of the vector at the corresponding temperature.
Maximum width for confidence_interval of log marginal likelihood to allow before stopping the chain.
Numeric value of statistical confidence with which returning interval should contain the true value.
Integer value of number of simulations to use in estimation of the confidence interval.
Numeric value used to determine whether to stop the sampling procedure after successive blocks. If we are confident (to the level of confidence) that the evidence for model gamma = 1 is under this value, sampling is halted.
Numeric matrix of log probabilities of y at different temperatures (columns) in different iterations (rows).
List of outputs of calls to MCMC routine.
To print execution progress or not.
Other arguments passed to call_cpp