Transform a set of parameter values to the unconstrained scale — fit-method-unconstrain_variables • cmdstanr
Description: The $unconstrain_variables() method transforms input parameters to the unconstrained scale.

# Transform a set of parameter values to the unconstrained scale

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

The `$unconstrain_variables()` method transforms input parameters to the unconstrained scale.

    unconstrain_variables(variables)

## Arguments

variables

  (list) A list of parameter values to transform, in the same format as provided to the `init` argument of the `$sample()` method.

## 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", force_recompile = TRUE)
    #> Compiling Stan program...
    fit_mcmc$init_model_methods()
    #> Compiling additional model methods...
    fit_mcmc$unconstrain_variables(list(alpha = 0.5, beta = c(0.7, 1.1, 0.2)))
    #> [1] 0.5 0.7 1.1 0.2
    # }