Get draws of a distributional parameter from a brmsprep or
mvbrmsprep object. This function is primarily useful when developing
custom families or packages depending on brms.
This function lets callers easily handle both the case when the
distributional parameter is predicted directly, via a (non-)linear
predictor or fixed to a constant. See the vignette
vignette("brms_customfamilies") for an example use case.
Arguments
- prep
A 'brmsprep' or 'mvbrmsprep' object created by
prepare_predictions.- dpar
Name of the distributional parameter.
- i
The observation numbers for which predictions shall be extracted. If
NULL(the default), all observation will be extracted. Ignored ifdparis not predicted.- inv_link
Should the inverse link function be applied? If
NULL(the default), the value is chosen internally. In particular,inv_linkisTRUEby default for custom families.