Skip to content

Suggest remediation actions for heteroscedasticity

Source: R/remediation.R ยท Help: ?suggestRemediation

Given diagnostic test results from runHeteroTests(), this helper provides a basic summary of recommended follow-up steps. It evaluates the number of significant tests and proposes variance stabilising transformations or modelling approaches.

Usage

suggestRemediation(diagnostic_results)

## S3 method for class 'remediation_suggestions'
print(x, ...)

Arguments

diagnostic_results
Named list of htest objects as returned by runHeteroTests().
x
Object of class remediation_suggestions.
...
Not used.

Value

An object of class remediation_suggestions containing a summary of potential actions.

Details

The function counts how many diagnostic tests yield a p-value below 0.05. If none are significant it returns a brief conclusion that no action is needed. Otherwise a severity level is assigned and appropriate transformations or variance modelling approaches are suggested: a transformation when White's test rejects, and variance modelling when the Breusch-Pagan test ("breusch_pagan") or Koenker's studentized form of it ("koenker", in the default battery of runHeteroTests() since 0.15.0) rejects.

Examples

data(mtcars)
mod <- lm(mpg ~ wt + qsec, data = mtcars)
res <- runHeteroTests(mod, mtcars)
suggestRemediation(res)