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

mi

Predictors with Missing Values in brms Models


Description

Specify predictor term with missing values in brms. The function does not evaluate its arguments – it exists purely to help set up a model.

Usage

mi(x)

Arguments

x

The variable containing missings.

Details

For detailed documentation see help(brmsformula).

See Also

Examples

## Not run: 
data("nhanes", package = "mice")
bform <- bf(bmi | mi() ~ age * mi(chl)) +
  bf(chl | mi() ~ age) + set_rescor(FALSE)
fit <- brm(bform, data = nhanes)
summary(fit)
plot(conditional_effects(fit, resp = "bmi"), ask = FALSE)
LOO(fit, newdata = na.omit(fit$data))

## 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.