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. The rows of
dataare matched to the observations of the fit as the tests match them, by row name in any order, or for data that only number their rows by the row numbers of the fit or in its order, and bound as broom binds them, in the order ofdata, each row with its own fitted value and residual: on a fit withoutna.action = na.excludethe rows the fit used, so the full data of a fit that dropped rows give those rows; on a fit withna.excludethose rows and the rows it dropped, withNAthere, every row of its full data. Given the rows of its observations only, as its model frame withoutdata, a fit withna.excludebinds them in the order of the fit with a row ofNAat each row it dropped. Data whose rows cannot be shown to hold the observations are refused (seetest_results). The data of a tidymodels workflow, or of a parsnip fit offit_xy(), are mapped to the variables of its engine asrunHeteroTests()maps them, and each mapped row is traced to the row ofdatait was made from: the data of a preprocessing that drops or adds rows of new data, such asstep_filter()withskip = FALSE, or reorders them, such asstep_arrange(), are refused, since it does not say which row ofdataeach observation comes from, and so are those of a step that makes a row from other rows, such asstep_mutate(cs = cumsum(x)), whose values 0.16.0 bound right in the order of the fit. Before 0.17.0 the rows were bound row by row: named data in another order than the fit had the values of other observations bound to them, and the full data of a fit withna.omitcould not be bound. ...- 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