Skip to content

Resampling

bootstrap()
Generate n bootstrap replicates.
crossv_mc() crossv_kfold() crossv_loo()
Generate test-training pairs for cross-validation
permute() permute_()
Generate n permutation replicates.
resample()
A "lazy" resample.
resample_bootstrap()
Generate a boostrap replicate
resample_partition()
Generate an exclusive partitioning of a data frame
resample_permutation()
Create a resampled permutation of a data frame

Prediction grids

add_predictions() spread_predictions() gather_predictions()
Add predictions to a data frame
data_grid()
Generate a data grid.
typical()
Find the typical value
seq_range()
Generate a sequence over the range of a vector

Residuals and quality metrics

add_residuals() spread_residuals() gather_residuals()
Add residuals to a data frame
mse() rmse() mae() rsquare() qae() mape() rsae()
Compute model quality for a given dataset

Formulas

fit_with()
Fit a list of formulas
add_predictors()
Add predictors to a formula
formulas() formulae()
Create a list of formulas

Data

sim1 sim2 sim3 sim4
Simple simulated datasets
heights
Height and income data.

Helpers

geom_ref_line()
Add a reference line (ggplot2).
model_matrix()
Construct a design matrix
na.warn()
Handle missing values with a warning