-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_adterms.Rmd
34 lines (30 loc) · 1 KB
/
update_adterms.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: "``brms::update_adterms``"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(brms)
```
update_adterms Update Formula Addition Terms
#### Description
Update additions terms used in formulas of brms. See addition-terms for #### Details.
#### Usage
<pre><code>
update_adterms(formula, adform, action = c("update", "replace"))
</code></pre>
#### 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.
validate_newdata 159
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))