Skip to content

Run a suite of model diagnostics

Source: man/runDiagnostics.Rd ยท Help: ?runDiagnostics

Combines heteroscedasticity checks with tests for collinearity, nonlinearity and influential observations.

Usage

runDiagnostics(
  model,
  data = NULL,
  tests = c("white", "koenker"),
  power = 2:3,
  use_cache = TRUE,
  chunk_threshold_mb = Inf,
  chunk_size = 10000,
  progress = interactive()
)

Arguments

model
A fitted lm, or a glm with the Gaussian family and the identity link, or a formula. The tests refuse a glm of any other family or link since 0.15.0.
data
Optional data frame if model is a formula.
tests
Heteroscedasticity tests to run. Defaults to the White and Koenker tests, the default of runHeteroTests; it was the White and the classical Breusch-Pagan tests up to 0.14.0.
power
Powers for performRESETTest.
use_cache
Logical flag forwarded to runHeteroTests controlling whether cached diagnostic results may be reused.
chunk_threshold_mb
Size of the data in megabytes above which runHeteroTests runs the streaming forms of the White, Breusch-Pagan and Koenker tests. The default, Inf, never streams; give a finite value to ask for them. Up to 0.15.0 the default was 100.
chunk_size
Integer chunk size supplied to runHeteroTests when the streaming tests run.
progress
Logical flag controlling whether textual progress indicators are displayed during long-running operations.

Value

A list with the results of all diagnostics.

Examples

data(mtcars)
runDiagnostics(mpg ~ wt + qsec, mtcars)