Calculate the log-probability, the gradient w.r.t. each input, and the Hessian for a given vector of unconstrained parameters
Source:R/fit.R
fit-method-hessian.RdThe $hessian() method provides access to the Stan model's
log_prob, its derivative, and its Hessian.
Examples
# \dontrun{
fit_mcmc <- cmdstanr_example("logistic", method = "sample", force_recompile = TRUE)
# fit_mcmc$init_model_methods()
# fit_mcmc$hessian(unconstrained_variables = c(0.5, 1.2, 1.1, 2.2))
# }