The $variable_skeleton()
method returns the variable skeleton
needed by utils::relist()
to re-structure a vector of constrained
parameter values to a named list.
variable_skeleton(transformed_parameters = TRUE, generated_quantities = TRUE)
(logical) Whether to include transformed
parameters in the skeleton (defaults to TRUE
).
(logical) Whether to include generated quantities
in the skeleton (defaults to TRUE
).
log_prob()
, grad_log_prob()
, constrain_variables()
,
unconstrain_variables()
, unconstrain_draws()
, variable_skeleton()
,
hessian()
# \dontrun{
fit_mcmc <- cmdstanr_example("logistic", method = "sample", force_recompile = TRUE)
fit_mcmc$variable_skeleton()
#> $alpha
#> [1] 0
#>
#> $beta
#> [1] 0 0 0
#>
#> $log_lik
#> [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>
# }