check_augment_no_data: Check an augment method when no data or newdata is passed

View source: R/check_augment_no_data.R

check_augment_no_dataR Documentation

Check an augment method when no data or newdata is passed

Description

Call this function to perform tests. If a tests fails, an informative error will be thrown. Otherwise silent.

Test when strict = FALSE:

  • None

Additional tests when strict = TRUE:

  • aug(model) either returns an informative error or produces output that passes check_tibble().

  • If the output passes check_tibble, will issue warning when:

    • Augmented data is missing rows from original data.

    • Augmented data is missing columns from original data.

    • Original data has rownames but ugmented data is missing .rownames column.

Usage

check_augment_no_data(aug, model, passed_data, strict = TRUE)

Arguments

aug

An augment method. For example, augment.betareg.

model

A fit model object to call the augment method on.

passed_data

The dataset that model was original fit on that aug should try to reconstruct when neither data nor newdata is specified.

strict

Logical indicating whether the strict version of tests should be used. Defaults to TRUE.

Value

An invisible NULL. This function should be called for side effects, not return values.


alexpghayes/modeltests documentation built on March 7, 2024, 11 p.m.