A CmdStanMLE
object is the fitted model object returned by the
$optimize()
method of a CmdStanModel
object.
CmdStanMLE
objects have the following associated methods,
all of which have their own (linked) documentation pages.
Method | Description |
draws() | Return the point estimate as a 1-row draws_matrix . |
$mle() | Return the point estimate as a numeric vector. |
$lp() | Return the total log probability density (target ). |
$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. |
Method | Description |
$summary() | Run posterior::summarise_draws() . |
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. |
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. |
Method | Description |
$expose_functions() | Expose Stan functions for use in R. |
$init_model_methods() | Expose methods for log-probability, gradients, parameter constraining and unconstraining. |
$log_prob() | Calculate log-prob. |
$grad_log_prob() | Calculate log-prob and gradient. |
$hessian() | Calculate log-prob, gradient, and hessian. |
$constrain_variables() | Transform a set of unconstrained parameter values to the constrained scale. |
$unconstrain_variables() | Transform a set of parameter values to the unconstrained scale. |
$unconstrain_draws() | Transform all parameter draws to the unconstrained scale. |
$variable_skeleton() | Helper function to re-structure a vector of constrained parameter values. |
The CmdStanR website (mc-stan.org/cmdstanr) for online documentation and tutorials.
The Stan and CmdStan documentation:
Stan documentation: mc-stan.org/users/documentation
CmdStan User’s Guide: mc-stan.org/docs/cmdstan-guide
Other fitted model objects:
CmdStanDiagnose
,
CmdStanGQ
,
CmdStanLaplace
,
CmdStanMCMC
,
CmdStanPathfinder
,
CmdStanVB