rename_pars: Rename Parameters

Description Usage Arguments Value Examples

View source: R/rename_pars.R

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

1

Arguments

x

A brmsfit object.

Value

A brmfit object with adjusted parameter names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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 documentation built on Aug. 23, 2021, 5:08 p.m.