Heteroscedasticity Test Factory¶
Source: R/test_factory.R ยท Help: ?TestFactory
Provides a registry of heteroscedasticity tests with metadata and
convenience methods to run them with input validation. This is an
alternative to the older environment-based registry used by
runHeteroTests().
Deprecated¶
TestFactory and its shared instance test_factory are deprecated since
0.14.0: they are the package's internal machinery and leave the exports in
1.0.0. They are objects rather than functions, so they cannot warn when
used; this page and NEWS.md are the notice. Use registerDiagnostic() to
add a test and runHeteroTests() to run one.
Usage¶
The shared instance test_factory can be used to register new tests
and execute them. See register and run_test methods
for details.
Methods¶
Public methods¶
TestFactory$register()TestFactory$get_available()TestFactory$run_test()TestFactory$clone()
Method register()¶
Usage¶
Arguments¶
name- Name of the test
func- Function with arguments
modelanddata metadata- Optional list with metadata fields
Returns¶
Invisibly returns the factory Get available tests
Method get_available()¶
Usage¶
Arguments¶
data_type- Filter by supported data type
min_n- Filter by minimum observations
Returns¶
Character vector of test names Run a registered test
Method run_test()¶
Usage¶
Arguments¶
test_name- Name of the test
model- Fitted model
data- Data frame used to fit the model
...- Additional arguments passed to the test
Returns¶
Result of the test
Method clone()¶
The objects of this class are cloneable with this method.
Usage¶
Arguments¶
deep- Whether to make a deep clone.