R: Tests base predict function against tidypredict

tidypredict_test {tidypredict} | R Documentation

## Tests base predict function against tidypredict

### Description

Compares the results of predict() and tidypredict_to_column() functions.

### Usage

    tidypredict_test(model, df = model$model, threshold = 1e-12,
      include_intervals = FALSE, max_rows = NULL)

### Arguments

`model` | An R model or a tibble with a parsed model. It currently supports lm(), glm() and randomForest() models.
`df` | A data frame that contains all of the needed fields to run the prediction. It defaults to the "model" data frame object inside the model object.
`threshold` | The number that a given result difference, between predict() and tidypredict_to_column() should not exceed. For continuous predictions, the default value is 0.000000000001 (1e-12), for categorical predictions, the default value is 0.
`include_intervals` | Switch to indicate if the prediction intervals should be included in the test. It defaults to FALSE.
`max_rows` | The number of rows in the object passed in the df argument. Highly recommended for large data sets.

### Examples

    library(dplyr)
    df <- mutate(mtcars, cyl = paste0("cyl", cyl))
    model <- lm(mpg ~ wt + cyl * disp, offset = am, data = df)
    tidypredict_test(model)

[Package tidypredict version 0.1.0 Index]