dot-generate_plots: Generate diagnostic plots for distribution models

.generate_plotsR Documentation

Generate diagnostic plots for distribution models

Description

This internal function creates a set of diagnostic plots for evaluating the fit of various distribution families to bounded data in the (0, 1) interval. It generates histograms with fitted density overlays, P-P plots, Q-Q plots, and profile likelihood plots when available.

Usage

.generate_plots(result, data, family, silent = FALSE)

Arguments

result

A list containing model fit results from TMB or Newton-Raphson, must include a 'coefficients' element with named parameters.

data

Numeric vector with values in the (0, 1) interval.

family

Character string specifying the distribution family. Supported values: "gkw", "bkw", "kkw", "ekw", "mc", "kw", "beta".

silent

Logical; if TRUE, suppresses messages. Default is FALSE.

Value

A list of ggplot2 objects:

histogram

Histogram with fitted density overlay

pp_plot

Probability-Probability plot

qq_plot

Quantile-Quantile plot

profile_*

Profile likelihood plots for each parameter (if available)


gkwreg documentation built on April 16, 2025, 1:10 a.m.