Learn R Programming

brms (version 2.22.0)

rename_pars: Rename parameters in brmsfit objects

Description

Rename parameters within the stanfit object after model fitting to ensure reasonable parameter names. This function is usually called automatically by brm and users will rarely be required to call it themselves.

Usage

rename_pars(x)

Value

A brmsfit object with adjusted parameter names.

Arguments

x

A brmsfit object.

Details

Function rename_pars is a deprecated alias of rename_pars.

Examples

Run this code
if (FALSE) {
# fit a model manually via rstan
scode <- stancode(count ~ Trt, data = epilepsy)
sdata <- standata(count ~ Trt, data = epilepsy)
stanfit <- rstan::stan(model_code = scode, data = sdata)

# feed the Stan model back into brms
fit <- brm(count ~ Trt, data = epilepsy, empty = TRUE)
fit$fit <- stanfit
fit <- rename_pars(fit)
summary(fit)
}

Run the code above in your browser using DataLab