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

update_adterms

Update Formula Addition Terms


Description

Update additions terms used in formulas of brms. See addition-terms for details.

Usage

update_adterms(formula, adform, action = c("update", "replace"))

Arguments

formula

Two-sided formula to be updated.

adform

One-sided formula containing addition terms to update formula with.

action

Indicates what should happen to the existing addition terms in formula. If "update" (the default), old addition terms that have no corresponding term in adform will be kept. If "replace", all old addition terms will be removed.

Value

An object of class formula.

Examples

form <- y | trials(size) ~ x
update_adterms(form, ~ trials(10))
update_adterms(form, ~ weights(w))
update_adterms(form, ~ weights(w), action = "replace")
update_adterms(y ~ x, ~ trials(10))

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.