Learn R Programming

MixStable (version 0.1.0)

plot_mixture_fit: Plot mixture fit with individual components

Description

Displays the estimated mixture density and optionally its individual components over a histogram of the data.

Usage

plot_mixture_fit(
  data,
  estimated_params,
  bins = 200,
  plot_components = TRUE,
  save_path = NULL,
  show_plot = TRUE,
  title = "Mixture of Alpha-Stable Distributions"
)

Value

Invisibly returns the file path to the saved plot (if save_path is provided), or NULL otherwise.

Arguments

data

Numeric vector of observations.

estimated_params

List with weights, alphas, betas, gammas, deltas.

bins

Number of histogram bins.

plot_components

Logical, whether to show individual components.

save_path

Optional PNG filename.

show_plot

Logical, whether to display the plot.

title

Plot title.