GofCens-package: Goodness-of-Fit Methods for Complete and Right-Censored Data.

GofCens-packageR Documentation

Goodness-of-Fit Methods for Complete and Right-Censored Data.

Description

This package provides both graphical tools and goodness-of-fit tests for analyzing complete and right-censored data. It includes:

  1. Kolmogorov-Smirnov, Cramér-von Mises, and Anderson-Darling tests, which utilize the empirical distribution function for complete data and are extended to handle right-censored data.

  2. Generalized chi-squared-type test, which is based on the squared differences between observed and expected counts using random cells with right-censored data.

  3. Graphical tools, such as probability and cumulative hazard plots, to help guide decisions about the most appropriate parametric model for the data.

Details

The GofCens package can be used to assess the goodness of fit for the following eight distributions. The list below displays the parameterizations of their survival functions.

  1. Exponential Distribution [Exp(\beta)]

    S(t)=e^{-\frac{t}{\beta}}

  2. Weibull Distribution [Wei(\alpha,\,\beta)]

    S(t)=e^{-(\frac{t}{\beta})^\alpha}

  3. Gumbel Distribution [Gum(\mu,\,\beta)]

    S(t)=1 - e^{-e^{-\frac{t-\mu}{\beta}}}

  4. Log-Logistic Distribution [LLogis(\alpha, \beta)]

    S(t)=\frac{1}{1 + \left(\frac{t}{\beta}\right)^\alpha}

  5. Logistic Distribution [Logis(\mu,\beta)]

    S(t)=\frac{e^{-\frac{t -\mu}{\beta}}}{1 + e^{-\frac{t - \mu}{\beta}}}

  6. Log-Normal Distribution [LN(\mu,\beta)]

    S(t)=\int_{\frac{\log t - \mu}{\beta}}^\infty \!\frac{1}{\sqrt{2 \pi}}

  7. Normal Distribution [N(\mu,\beta)]

    S(t)=\int_t^\infty \! \frac{1}{\beta\sqrt{2\pi}}e^{-\frac{(x - \mu)^2}{2 \beta^2}} dx

  8. 4-Param. Beta Distribution [Beta(\alpha, \gamma, a, b)]

    S(t)=1 - \frac{B_{(\alpha, \gamma, a, b)}(t)}{B(\alpha, \gamma)}

The parameters of the theoretical distribution can be set manually using the params0 argument in each function. In this case, the correspondences are as follows: \alpha represents the shape, \gamma the shape2, \mu the location, and \beta the scale parameter.

Package: GofCens
Type: Package
Version: 1.2.1
Date: 2024-11-9
License: GPL (>= 2)

Author(s)

Klaus Langohr, Mireia Besalú, Matilde Francisco, Arnau Garcia, Guadalupe Gómez

Maintainer: Klaus Langohr <klaus.langohr@upc.edu>


GofCens documentation built on April 3, 2025, 9:02 p.m.