Learn R Programming

chkptstanr (version 0.1.1)

chkpt_setup: Checkpoint Setup

Description

Deterimine the number of checkpoints for the warmup and sampling, given the desired number of iterations for each and the iterations per checkpoint.

Usage

chkpt_setup(iter_sampling, iter_warmup, iter_per_chkpt)

Arguments

iter_sampling

(positive integer) The number of post-warmup iterations to run per chain. Note: in the CmdStan User's Guide this is referred to as num_samples.

iter_warmup

(positive integer) The number of warmup iterations to run per chain. Note: in the CmdStan User's Guide this is referred to as num_warmup.

iter_per_chkpt

(positive integer) The number of iterations per check point.

Value

A list with the following:

  • warmup_chkpts: Number of warmup checkpoints

  • sample_chkpts: Number of sampling checkpoints

  • total_chkpts: Total number of checkpoints (warmup_chkpts + sample_chkpts)

  • iter_per_chkpt: Iterations per checkpoint

Examples

Run this code
# NOT RUN {
chkpt_setup <- chkpt_setup(
  iter_sampling = 5000,
  iter_warmup = 2000,
  iter_per_chkpt = 10
)

chkpt_setup
# }

Run the code above in your browser using DataLab