Skip to contents

Displays four ggplot-based diagnostic panels by default:

  1. PIT histogram

  2. QQ residual plot

  3. Worm plot

  4. Rootogram

Fitted-data and newdata quantile forecast panels can be requested explicitly with include_fitted_quantiles and include_newdata_quantiles.

Usage

# S3 method for class 'gamlss.longitudinal'
plot(
  x,
  y,
  data = NULL,
  newdata = NULL,
  newdata_n = 8,
  quantiles = c(0.1, 0.5, 0.9),
  include_fitted_quantiles = FALSE,
  include_newdata_quantiles = FALSE,
  randomize = TRUE,
  time_stratified = FALSE,
  ...
)

Arguments

x

A fitted gamlss.longitudinal object.

y

Unused; included for S3 generic compatibility.

data

Optional data frame used as fallback for newdata plotting.

newdata

Optional data frame for the newdata forecast panel.

newdata_n

Number of rows to use from data when newdata is NULL.

quantiles

Quantiles for forecast panels.

include_fitted_quantiles

Logical; if TRUE, include fitted-data forecast quantiles in the dashboard.

include_newdata_quantiles

Logical; if TRUE, include newdata forecast quantiles in the dashboard. Uses newdata, or the first newdata_n rows of data if newdata is NULL.

randomize

Logical; randomized PIT/residual diagnostics.

time_stratified

Logical; if TRUE, show time-stratified diagnostic plots.

...

Additional arguments (currently unused).

Value

Invisibly returns a list of generated plot/data objects.