drm_formula() captures the formulae that define a drmTMB model. The
family decides which distributional parameters are valid; drm_formula()
only records the user's intended formulas. bf() is a short alias.
Examples
drm_formula(y ~ x, sigma ~ z)
#> <drm_formula>
#> y ~ x
#> sigma ~ z
drm_formula(y ~ x + (1 | id), sigma ~ z, sd(id) ~ x_group)
#> <drm_formula>
#> y ~ x + (1 | id)
#> sigma ~ z
#> sd(id) ~ x_group
drm_formula(
y ~ x + (1 | id) + (1 | site),
sigma ~ z,
sd(id) ~ x_group,
sd(site) ~ site_type
)
#> <drm_formula>
#> y ~ x + (1 | id) + (1 | site)
#> sigma ~ z
#> sd(id) ~ x_group
#> sd(site) ~ site_type
drm_formula(
mu1 = y1 ~ x1 + x2,
mu2 = y2 ~ x1,
sigma1 = ~ x1,
sigma2 = ~ x2,
rho12 = ~ x1 + x2
)
#> <drm_formula>
#> mu1 = y1 ~ x1 + x2
#> mu2 = y2 ~ x1
#> sigma1 = ~x1
#> sigma2 = ~x2
#> rho12 = ~x1 + x2
drm_formula(mvbind(y1, y2) ~ x1 + x2, sigma1 = ~ x1, sigma2 = ~ x2)
#> <drm_formula>
#> mvbind(y1, y2) ~ x1 + x2
#> sigma1 = ~x1
#> sigma2 = ~x2