Skip to contents

Plot marginal and pairwise distribution diagnostics

Usage

plot_dist(
  dataset = NULL,
  margin_dist = NULL,
  subject_var = NULL,
  time_var = NULL,
  response_var = NULL,
  offdiag_scale = c("pseudo", "response"),
  transform = c("normal", "uniform"),
  show_cor_stats = TRUE,
  fit = NULL,
  overlay = NULL,
  copula_dist = NULL,
  grid_n = 80,
  contour_bins = 8,
  ...
)

plotDist(...)

Arguments

dataset

Optional long-format data frame. Required unless fit contains stored data.

margin_dist

Optional gamlss.dist family object used for diagonal marginal overlays.

subject_var, time_var, response_var

Column names identifying subjects, time points, and responses. Required for raw data and inferred from fit when possible.

offdiag_scale

Character; show off-diagonal panels on response or pseudo-observation scale.

transform

Character; transform pseudo-observation off-diagonal panels to normal-score or uniform scale.

show_cor_stats

Logical; include Pearson and Kendall correlations in off-diagonal panel subtitles.

fit

Optional fitted gamlss.longitudinal object used for final-model margin and copula overlays.

overlay

Character; "none" preserves the historical plot, "margin" overlays fitted marginal densities on diagonal panels, "copula" overlays a selected copula on pseudo-observation off-diagonal panels, and "model" overlays the final fitted model using fit.

copula_dist

Optional copula_selection result or one-row selection table used when overlay = "copula".

grid_n

Grid size used for density overlays.

contour_bins

Number of copula contour levels.

...

Compatibility arguments passed from plotDist() to plot_dist().

Value

A ggpubr arranged plot object.