This function produces a 2x2 panel of plots for a fitted distribution: 1. Fitted PDF over histogram of data 2. Fitted CDF vs empirical CDF 3. QQ-plot (Theoretical vs Sample Quantiles) 4. PP-plot (Fitted CDF vs Empirical CDF)
plot_fitted(
data,
pdf_fun,
cdf_fun,
par,
q_fun = NULL,
xlim = NULL,
ylim_pdf = NULL,
ylim_cdf = NULL,
lwd = 3,
lty = 2,
col_pdf = "yellow",
col_cdf = "red",
col_qq = "purple",
col_pp = "darkgreen"
)NULL (plots are generated as a side effect)
Numeric vector of observed data.
Function to compute the PDF; must take (par, x).
Function to compute the CDF; must take (par, x).
Numeric vector of fitted parameters.
Optional quantile function; must take (par, p). Default = NULL.
Numeric vector of length 2 for x-axis limits (default = range of data).
Numeric vector for y-axis limits of the PDF plot.
Numeric vector for y-axis limits of the CDF plot.
Line width for curves (default = 3).
Line type for curves (default = 2).
Color for the PDF curve (default = "yellow").
Color for the CDF curve (default = "red").
Color for QQ-plot points (default = "purple").
Color for PP-plot points (default = "darkgreen").