Format formula-derived parameter names and extract exact indexed JAGS parameter columns.
format_parameter_names(
parameters,
formula_parameters = NULL,
formula_random = NULL,
formula_prefix = TRUE,
formula_scale = NULL
)
JAGS_parameter_names(parameters, formula_parameter = NULL)
JAGS_regex_escape(x)
JAGS_indexed_parameter_columns(columns, parameter)
JAGS_indexed_parameter_matrix(samples, parameter, drop_missing = TRUE)
JAGS_indexed_parameter_vector(row, parameter)a vector of parameter names
a vector of formula parameter prefix names
a vector of random effects grouping factors
whether the formula_parameters names should be
kept. Defaults to TRUE.
optional nested list containing scaling info. When provided,
intercepts from parameters with log_intercept = TRUE attribute will be
renamed to exp(intercept).
a formula parameter prefix name
character vector to escape for regular-expression matching.
character vector of column names.
exact unindexed JAGS parameter name.
matrix, data frame, mcmc, or mcmc.list object.
whether missing indexed columns should return
NULL. If FALSE, a zero-column matrix with the input row count
is returned.
named row vector, list, or one-row data frame.
format_parameter_names(), JAGS_parameter_names(), and
JAGS_regex_escape() return character vectors.
JAGS_indexed_parameter_columns() returns a logical vector.
JAGS_indexed_parameter_matrix() returns a matrix of exact indexed
parameter columns sorted by numeric index, or NULL when none are
present and drop_missing = TRUE.
JAGS_indexed_parameter_vector() returns indexed row values sorted by
numeric index.
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"