Validate diagnostics against reference implementations
Source:R/robust_implementations.R
rvalidate_against_reference.RdCompares the package's test results with established implementations
from other packages (currently lmtest and car). Differences exceeding
the supplied tolerance are flagged.
Arguments
- test_name
Character scalar naming the diagnostic: "breusch_pagan", "studentized_bp", or "white".
- model
A fitted stats::lm object representing the mean specification to be diagnosed.
- data
A base::data.frame (or object coercible to one) containing the variables referenced by
model. It must include the observations used to fitmodeland will be checked for missing values.- tolerance
Acceptable absolute difference between statistics and p-values when comparing to the reference implementation.