A CmdStanDiagnose
object is the object returned by the
$diagnose()
method of a CmdStanModel
object.
CmdStanDiagnose
objects have the following associated
methods:
Method | Description |
$gradients() | Return gradients from diagnostic mode. |
$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. |
$save_output_files() | Save output CSV files to a specified location. |
$save_data_file() | Save JSON data file to a specified location. |
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:
CmdStanGQ
,
CmdStanLaplace
,
CmdStanMCMC
,
CmdStanMLE
,
CmdStanPathfinder
,
CmdStanVB
# \dontrun{
test <- cmdstanr_example("logistic", method = "diagnose")
# retrieve the gradients
test$gradients()
#> param_idx value model finite_diff error
#> 1 0 1.025820 -9.58652 -9.58652 1.06300e-08
#> 2 1 -1.330520 7.42547 7.42547 3.40819e-08
#> 3 2 -1.187440 13.23460 13.23460 7.67016e-09
#> 4 3 0.699258 3.50023 3.50023 6.99257e-09
# }