
Validate a spec_ir object against schema and statistical sanity guardrails
Source: R/spec-validate.R
validate_spec_ir.RdPerforms pure-R structural schema validation (category = "schema") and
statistical sanity and identifiability checks (category = "statistical"),
including strict ASCII identifier allowlists, closed nested object keys
(rejecting unknown extra fields from LLM JSON), positive variances and sample
sizes, ICC bounds, random-slope identifiability, positive-definite predictor
and random-effects correlation matrices via eigenvalue checks, missingness
bounds, estimator-family compatibility, and parameter grid bounds.
Value
An S3 object of class spec_validation with elements:
valid: logical scalar (TRUEwhennrow(errors) == 0L).errors: data.frame with columnspath,code,category,message.warnings: data.frame with columnspath,code,category,message.
Examples
spec <- new_spec_ir()
validate_spec_ir(spec)
#> ✔ spec_ir validation passed (0 errors, 0 warnings).