Skip to contents

Defining populations

Define a population, including predictors and response variables.

population()
Define the population generalized regression relationship
predictor()
Specify the distribution of a predictor variable
response()
Specify a response variable in terms of predictors
ols_with_error()
Family representing a linear relationship with non-Gaussian errors
custom_family()
Family representing a GLM with custom distribution and link function

Simulating and diagnosing fits

Draw samples from a population and diagnose model fits.

sample_x() sample_y()
Draw a data frame from the specified population.
parametric_boot_distribution()
Simulate the distribution of estimates by parametric bootstrap
model_lineup()
Produce a lineup for a fitted model
decrypt()
Decrypt message giving the location of the true plot in a lineup
sampling_distribution()
Simulate the sampling distribution of estimates from a population

Extracting information from regression fits

Get different types of diagnostics from fits.

augment_longer()
Augment a model fit with residuals, in "long" format
partial_residuals()
Augment a model fit with partial residuals for all terms
binned_residuals()
Obtain binned residuals for a model
bin_by_interval() bin_by_quantile()
Group a data frame into bins
empirical_link()
Empirically estimate response values on the link scale

Working with factors

Use factors to model categorical variables.

rfactor()
Draw random values from a factor variable
by_level()
Convert factor levels to numeric values