% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{validate_data}
\alias{validate_data}
\title{Pre-validation of data and parameters}
\usage{
validate_data(dat_list)
}
\arguments{
\item{dat_list}{A list of data to be passed to the model (usually containing matrices or numeric vectors).}
}
\value{
Returns invisible `NULL` on success. Interrupts execution with `stop()` or issues `warning()` if issues are found.
}
\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.
}
\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.
}
