extract_stan_state: Extract Stan State

View source: R/extract_stan_state.R

extract_stan_stateR Documentation

Extract Stan State

Description

Extract Stan State

Usage

extract_stan_state(object, phase)

Arguments

object

An object of class cmdstanr

phase

Character string indicating the current phase. Options include wormup and sample/

Value

A list containing the inverse metric, step size, and last MCMC draw (to be used as the initial value for the next checkpoint)

Examples

## Not run: 
library(cmdstanr)

# eight schools example
fit_schools_ncp_mcmc <- cmdstanr_example("schools_ncp")

extract_stan_state(fit_schools_ncp_mcmc, "sample")

## End(Not run)

chkptstanr documentation built on April 29, 2022, 5:06 p.m.