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
htestobjects as returned byrunHeteroTests().- x
Object of class
remediation_suggestions.- ...
Not used.
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.
Examples
data(mtcars)
mod <- lm(mpg ~ wt + qsec, data = mtcars)
res <- runHeteroTests(mod, mtcars)
suggestRemediation(res)
#> $severity
#> [1] "Low"
#>
#> $transformations
#> [1] "log" "sqrt"
#>
#> attr(,"class")
#> [1] "remediation_suggestions"