Skip to contents

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.

Usage

drm_formula(...)

bf(...)

Arguments

...

Formulae or named formulae. The unnamed response formula is interpreted as the location formula for a univariate model. For bivariate models, prefer explicit mu1 = y1 ~ ... and mu2 = y2 ~ ... formulas.

Value

A drm_formula object.

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