# \donttest{
# note: iter = 250 for demonstrative purposes
########################################
### example 1: control with formula ###
########################################
# (the following works with all data types)
# controlling for gender
Y <- bfi
# to control for only gender
# (remove education)
Y <- subset(Y, select = - education)
# fit model
fit <- estimate(Y, formula = ~ gender,
iter = 250)
# note regression coefficients
samps <- posterior_samples(fit)
hist(samps[,1])
# }
Run the code above in your browser using DataLab