Return the variable skeleton needed by the utils::relist function to re-structure a vector of constrained parameter values to a named list — fit-method-variable_skeleton • cmdstanr
Description: The $variable_skeleton() method returns the variable skeleton

# Return the variable skeleton needed by the utils::relist function to re-structure a vector of constrained parameter values to a named list

Source: `R/fit.R`
`fit-method-variable_skeleton.Rd`

The `$variable_skeleton()` method returns the variable skeleton

    variable_skeleton(transformed_parameters = TRUE, generated_quantities = TRUE)

## Arguments

transformed_parameters

  (boolean) Whether to include transformed parameters in the skeleton (defaults to TRUE)

generated_quantities

  (boolean) Whether to include generated quantities in the skeleton (defaults to TRUE)

## See also

`log_prob()`, `grad_log_prob()`, `constrain_variables()`, `unconstrain_variables()`, `unconstrain_draws()`, `variable_skeleton()`, `hessian()`

## Examples

    # \dontrun{
    fit_mcmc <- cmdstanr_example("logistic", method = "sample")
    fit_mcmc$init_model_methods()
    #> Error: Model methods cannot be used with a pre-compiled Stan executable, the model must be compiled again
    fit_mcmc$variable_skeleton()
    #> Error: The method has not been compiled, please call `init_model_methods()` first
    # }