Skip to contents

This helper tries to apply a list of initial values to a NIMBLE model and fails early with an informative error if something is incompatible.

Usage

checkInits(model, inits, silent = FALSE)

Arguments

model

A NIMBLE model object, or a function that returns either a NIMBLE model or a list containing a $model component.

inits

List of initial values, typically matching node/variable names used in the model.

silent

Logical; if FALSE (default), a short diagnostic message is emitted before the error is thrown.

Value

Invisibly returns TRUE if the initial values are valid; otherwise throws an error describing the offending field(s).