fit-method-hessian | R Documentation |
The $hessian()
method provides access to the Stan model's
log_prob
, its derivative, and its hessian.
hessian(unconstrained_variables, jacobian = TRUE, jacobian_adjustment = NULL)
unconstrained_variables |
(numeric) A vector of unconstrained parameters. |
jacobian |
(logical) Whether to include the log-density adjustments from un/constraining variables. |
jacobian_adjustment |
Deprecated. Please use |
log_prob()
, grad_log_prob()
, constrain_variables()
,
unconstrain_variables()
, unconstrain_draws()
, variable_skeleton()
,
hessian()
## Not run:
fit_mcmc <- cmdstanr_example("logistic", method = "sample", force_recompile = TRUE)
# fit_mcmc$init_model_methods(hessian = TRUE)
# fit_mcmc$hessian(unconstrained_variables = c(0.5, 1.2, 1.1, 2.2))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.