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

GofCens-packageR Documentation

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

Description

This package implements both graphical tools and goodness-of-fit tests for right-censored data. All functions can handle complete as well as right-censored data. It has implemented:

  1. Kolmogorov-Smirnov (KScens), Cramér-von Mises (CvMcens), and Anderson-Darling (ADcens) tests, which use the empirical distribution function for complete data and are extended for right-censored data.

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

  3. A series of graphical tools such as probability (probPlot) or cumulative hazard (cumhazPlot) plots to guide the decision about the most suitable parametric model for the data.

Details

All functions of the GofCens package can be used to check the goodness of fit of the following 8 distributions. The list shows the parametrizations of the 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 list of the parameters of the theoretical distribution can be set manually using the argument params of each function. In that case, the correspondence is: \alpha is the shape value, \gamma is the shape2 value, \mu is the location value and \beta is the scale value.

In addition, the functions KScens, CvMcens, ADcens, and chisqcens can be used with any other distribution for which the corresponding density (dname), distribution (pname), and random generator (rname) functions are defined.

Package: GofCens
Type: Package
Version: 1.5
Date: 2025-05-29
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 June 8, 2025, 10:11 a.m.