Skip to content

broom methods for heteroscedasticity diagnostics

Source: man/tidy.hetero_test.Rd ยท Help: ?tidy.hetero_test

Tidy, glance and augment methods integrating heteroscedasticity diagnostics with the broom generics from the generics package.

Usage

## S3 method for class 'hetero_test'
tidy(x, ...)
## S3 method for class 'hetero_test'
glance(x, ...)
## S3 method for class 'hetero_test'
augment(x, data = NULL, ...)
## S3 method for class 'hetero_test_suite'
tidy(x, ...)
## S3 method for class 'hetero_test_suite'
glance(x, ...)
## S3 method for class 'hetero_test_suite'
augment(x, data = NULL, ...)
## S3 method for class 'hetero_grouped_suite'
tidy(x, ...)

Arguments

x
Heteroscedasticity diagnostic result(s) returned by runHeteroTests.
data
Optional data frame used to augment diagnostics; defaults to the data embedded within the fitted model when available.
...
Passed through for compatibility.

Value

A data frame summarising the diagnostic(s), or an augmented data set containing fitted values and residuals alongside the original predictors.

tidy returns one row per test. parameter is the first parameter of the test and parameter2 the second, for a test that has two (the denominator degrees of freedom of an F statistic, or the number of bootstrap replications); it is NA otherwise. estimate is given when the test reports exactly one estimate. Up to 0.12.0 a test with two parameters was returned as two rows.

See also

generics::tidy, generics::glance, generics::augment

Examples

if (requireNamespace("generics", quietly = TRUE)) {
  data(mtcars)
  fit <- lm(mpg ~ wt + qsec, data = mtcars)
  suite <- runHeteroTests(fit, mtcars, tests = c("white", "breusch_pagan"))
  generics::tidy(suite)
}