Learn R Programming

MixStable (version 0.1.0)

plot_comparison: Compare EM-estimated mixture with a non-optimized reference model

Description

Plots the fitted EM mixture density alongside a manually defined reference mixture to visually compare estimation quality.

Usage

plot_comparison(data, p1, p2, w)

Value

Invisibly returns the file path to the saved PNG image of the comparison plot.

Arguments

data

Numeric vector of observations.

p1

Vector of parameters for component 1 (alpha, beta, gamma, delta).

p2

Vector of parameters for component 2.

w

Mixing weight for component 1.