validate_data: Pre-validation of data and parameters

validate_dataR Documentation

Pre-validation of data and parameters

Description

Before passing data to 'rtmb_model', it checks for the presence of R-specific data types (such as data.frame) and missing values, and outputs errors or warnings accordingly.

Usage

validate_data(dat_list)

Arguments

dat_list

A list of data to be passed to the model (usually containing matrices or numeric vectors).

Details

RTMB's automatic differentiation engine requires pure 'matrix' or 'numeric' types. If a user mistakenly passes a 'data.frame', incomprehensible errors occur during the construction of the computation graph. This function catches such issues in advance.

Value

Returns invisible 'NULL' on success. Interrupts execution with 'stop()' or issues 'warning()' if issues are found.


BayesRTMB documentation built on Nov. 24, 2026, 9:06 a.m.