Skip to contents

Low-level (internal) constructor. All model-fitting functions must use this constructor rather than calling structure() directly, so the class invariants are enforced in one place.

Usage

new_hbmfit(model, missing_method = NULL, data)

Arguments

model

A brmsfit or brmsfit_multiple object.

missing_method

Character scalar or NULL.

data

The original data.frame.

Value

An object of class "hbmfit".

Details

Together with validate_hbmfit and hbmfit, this follows the trio-constructor pattern recommended in Hadley Wickham's Advanced R (chapter 13): new_hbmfit() is fast and minimal, validate_hbmfit() is slow and thorough, and hbmfit() is the user-facing helper.