update.brmsfit_multiple: Update 'brms' models based on multiple data sets

Description Usage Arguments Examples

View source: R/update.R

Description

This method allows to update an existing brmsfit_multiple object.

Usage

1
2
## S3 method for class 'brmsfit_multiple'
update(object, formula., newdata = NULL, ...)

Arguments

object

An object of class brmsfit_multiple.

formula.

Changes to the formula; for details see update.formula and brmsformula.

newdata

List of data.frames to update the model with new data. Currently required even if the original data should be used.

...

Other arguments passed to update.brmsfit and brm_multiple.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(mice)
imp <- mice(nhanes2)

# initially fit the model 
fit_imp1 <- brm_multiple(bmi ~ age + hyp + chl, data = imp, chains = 1)
summary(fit_imp1)

# update the model using fewer predictors
fit_imp2 <- update(fit_imp1, formula. = . ~ hyp + chl, newdata = imp)
summary(fit_imp2)

## End(Not run)

brms documentation built on Aug. 23, 2021, 5:08 p.m.