Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rename_pars

Rename Parameters


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)

Arguments

x

A brmsfit object.

Value

A brmfit object with adjusted parameter names.

Examples

## Not run: 
# fit a model manually via rstan
scode <- make_stancode(count ~ Trt, data = epilepsy)
sdata <- make_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)

## End(Not run)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.