Panel plot

A panel plot displays each units data along with the model’s fitted values. Currently, the function only supports models with one predictor variable.

These functions rely on obtaining tidy tibbles of the model’s fitted values:

Use panels() by setting a variable to be drawn on the x-axis (xvar), and (optional) parameter to sort the panels by:

Show data as points with `panels(…, data = T):

There are other options (see ?panels):

Spaghetti plots

A spaghetti plot displays regression lines of all levels of the grouping factor in a single panel.

spaghetti(fit_ml, xvar = "Days")