Removes additional formatting from parameter names outputted from JAGS.

format_parameter_names(
  parameters,
  formula_parameters = NULL,
  formula_prefix = TRUE
)

JAGS_parameter_names(parameters, formula_parameter = NULL)

Arguments

parameters

a vector of parameter names

formula_parameters

a vector of formula parameter prefix names

formula_prefix

whether the formula_parameters names should be kept. Defaults to TRUE.

formula_parameter

a formula parameter prefix name

Value

A character vector with reformatted parameter names.

Examples

format_parameter_names(c("mu_x_cont", "mu_x_fac3t", "mu_x_fac3t__xXx__x_cont"),
                       formula_parameters = "mu")
#> [1] "(mu) x_cont"         "(mu) x_fac3t"        "(mu) x_fac3t:x_cont"