brmsterms: Parse Formulas of 'brms' Models

View source: R/brmsterms.R

brmstermsR Documentation

Parse Formulas of brms Models

Description

Parse formulas objects for use in brms.

Usage

brmsterms(formula, ...)

## Default S3 method:
brmsterms(formula, ...)

## S3 method for class 'brmsformula'
brmsterms(formula, check_response = TRUE, resp_rhs_all = TRUE, ...)

## S3 method for class 'mvbrmsformula'
brmsterms(formula, ...)

Arguments

formula

An object of class formula, brmsformula, or mvbrmsformula (or one that can be coerced to that classes): A symbolic description of the model to be fitted. The details of model specification are explained in brmsformula.

...

Further arguments passed to or from other methods.

check_response

Logical; Indicates whether the left-hand side of formula (i.e. response variables and addition arguments) should be parsed. If FALSE, formula may also be one-sided.

resp_rhs_all

Logical; Indicates whether to also include response variables on the right-hand side of formula .$allvars, where . represents the output of brmsterms.

Details

This is the main formula parsing function of brms. It should usually not be called directly, but is exported to allow package developers making use of the formula syntax implemented in brms. As long as no other packages depend on this functions, it may be changed without deprecation warnings, when new features make this necessary.

Value

An object of class brmsterms or mvbrmsterms (for multivariate models), which is a list containing all required information initially stored in formula in an easier to use format, basically a list of formulas (not an abstract syntax tree).

See Also

brm, brmsformula, mvbrmsformula


brms documentation built on Sept. 23, 2024, 5:08 p.m.