powered by
Function to set up a model formula for use in qbrms, allowing specification of distributional parameters (e.g., sigma) in addition to the mean structure.
qbrms
bf(formula, ..., flist = NULL, family = NULL, nl = FALSE)
An object of class brmsformula (and qbrmsformula) containing the parsed formulas.
brmsformula
qbrmsformula
Main model formula (for the mean/location parameter).
Additional formulas for distributional parameters (e.g., sigma ~ x).
sigma ~ x
Optional list of formulas (for internal use).
Same as in qbrms() (optional here).
qbrms()
Logical; indicating if the model is non-linear (not yet fully supported).
This function mimics the brms::bf() syntax to allow users familiar with brms to define distributional models.
brms::bf()
Supported distributional parameters depend on the family:
gaussian: sigma (residual standard deviation)
gaussian
sigma
student_t: sigma, nu (degrees of freedom)
student_t
nu
lognormal: sigma (shape parameter)
lognormal
beta: phi (precision)
beta
phi
simplex: phi (precision)
simplex
if (FALSE) { # Standard model f1 <- bf(y ~ x) # Distributional model (heteroscedasticity) # Sigma varies by group f2 <- bf(y ~ x, sigma ~ group) }
Run the code above in your browser using DataLab