iclogcondist_visualization: Visualize the Estimated Cumulative Distribution Functions

View source: R/iclogcondist_visualization.R

iclogcondist_visualizationR Documentation

Visualize the Estimated Cumulative Distribution Functions

Description

This function visualizes a user-specified distribution true_dist (if available) and the estimated cumulative distribution functions (CDF) F(t) and log F(t) for a given range. The function overlays the estimated functions from a list of fitted models on the same plot, allowing comparison with the user-specified distribution (if provided). In a simulation study, the user-specified distribution can correspond to the true underlying distribution.

Usage

iclogcondist_visualization(X, range = NA, fit_list = list(), true_dist = NA)

Arguments

X

A dataset or input data used to prepare the plot range if range is not specified.

range

A numeric vector of length 2 specifying the range of t values for plotting. If NA the function calculates the range based on the input data X.

fit_list

A named list of fitted models, where each element is expected to contain an est object with estimates for generating the CDF plots. The name of the list should be "LCMLE","UMLE" or "LCM_UMLE"

true_dist

Optional. A data frame or list containing the user-specified distribution values, with components x and y representing the values of t and F(t) respectively.

Value

A list containing two ggplot objects: logF_plot for log F(t) and F_plot for F(t).

Examples

# Example usage
data(lgnm)
fit_LCMLE <- ic_LCMLE(lgnm)
fit_UMLE <- ic_UMLE(lgnm)
iclogcondist_visualization(
  X = lgnm,
  range = c(0, 10),
  fit_list = list(
    "UMLE" = fit_UMLE,
    "LCMLE" = fit_LCMLE
  )
)


iclogcondist documentation built on April 4, 2025, 5:18 a.m.