assertall: Check Assertions about a 'brmsfit' Model Object

assertallR Documentation

Check Assertions about a brmsfit Model Object

Description

These are a set of internal utility functions. They are not intended for general use. Instead, they are intended to be called in circumstances where the expected result is TRUE. All of them are designed to try to give informative error messages if the assertion is not met. All of them result in a stop() error if the assertion is not met.

Usage

.assertbrmsfit(object)

.assertgaussian(object)

.assertfamily(object)

.assertdpar(object, dpar)

.assertlink(object, dpar)

Arguments

object

A brmsfit model object to be evaluated.

dpar

Required for .assertdpar which checks this is valid. Optional for .assertlink which will use NULL if not specified. If specified, this should be NULL or a character string.

Details

  • .assertbrmsfitasserts that the object should be of class brmsfit.

  • .assertgaussianasserts that all random effects are Gaussian.

  • .assertfamilyasserts that the distribution (family) of the outcome is a currently supported family. Only applies when integrating out random effects.

  • .assertlinkasserts that the link function is a currently supported link function. Only applies when integrating out random effects.

Value

An invisible, logical TRUE if the assertion is met. An (informative) error message if the assertion is not met.


brmsmargins documentation built on May 20, 2022, 1:07 a.m.