Learn R Programming

qbrms (version 1.0.1)

validate_model_data: Validate data before model fitting

Description

Perform lightweight diagnostics on the response and predictors to catch common issues that derail model fitting (missingness, zero variance, impossible values for specific families, simple multicollinearity flags, and sample-size sanity checks).

Usage

validate_model_data(formula, data, family, verbose = TRUE)

Value

A list with elements valid (logical), errors

(character vector), warnings (character vector), and n_complete (integer count of complete cases across the variables in the model).

Arguments

formula

A model formula.

data

A data.frame containing the variables in the model.

family

A family object such as gaussian(), binomial(), or poisson(). Used for basic, family-specific checks.

verbose

Logical; print a summary of issues found.