CmdStanPathfinder: CmdStanPathfinder objects

CmdStanPathfinderR Documentation

CmdStanPathfinder objects

Description

A CmdStanPathfinder object is the fitted model object returned by the $pathfinder() method of a CmdStanModel object.

Methods

CmdStanPathfinder objects have the following associated methods, all of which have their own (linked) documentation pages.

Extract contents of fitted model object

Method Description
$draws() Return approximate posterior draws as a draws_matrix.
$lp() Return the total log probability density (target) computed in the model block of the Stan program.
$lp_approx() Return the log density of the approximation to the posterior.
$init() Return user-specified initial values.
$metadata() Return a list of metadata gathered from the CmdStan CSV files.
$code() Return Stan code as a character vector.

Summarize inferences

Method Description
$summary() Run posterior::summarise_draws().
$cmdstan_summary() Run and print CmdStan's bin/stansummary.

Save fitted model object and temporary files

Method Description
$save_object() Save fitted model object to a file.
$save_output_files() Save output CSV files to a specified location.
$save_data_file() Save JSON data file to a specified location.
$save_latent_dynamics_files() Save diagnostic CSV files to a specified location.

Report run times, console output, return codes

Method Description
$time() Report the total run time.
$output() Pretty print the output that was printed to the console.
$return_codes() Return the return codes from the CmdStan runs.

See Also

The CmdStanR website (mc-stan.org/cmdstanr) for online documentation and tutorials.

The Stan and CmdStan documentation:

Other fitted model objects: CmdStanDiagnose, CmdStanGQ, CmdStanLaplace, CmdStanMCMC, CmdStanMLE, CmdStanVB


stan-dev/cmdstanr documentation built on May 1, 2024, 7:17 a.m.