GofCens-package {GofCens} | R Documentation |
Goodness-of-Fit Methods for Complete and Right-Censored Data.
Description
This package implements both graphical tools and goodness-of-fit tests for complete and right-censored data. It has implemented:
Kolmogorov-Smirnov, Cramér-von Mises, and Anderson-Darling tests, which use the empirical distribution function for complete data and are extended for right-censored data.
Generalized chi-squared-type test, which is based on the squared differences between observed and expected counts using random cells with right-censored data.
A series of graphical tools such as probability or cumulative hazard plots to guide the decision about the most suitable parametric model for the data.
Details
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.
Exponential Distribution [Exp
(\beta)
]S(t)=e^{-\frac{t}{\beta}}
Weibull Distribution [Wei(
\alpha,\,\beta
)]S(t)=e^{-(\frac{t}{\beta})^\alpha}
Gumbel Distribution [Gum(
\mu,\,\beta
)]S(t)=1 - e^{-e^{-\frac{t-\mu}{\beta}}}
Log-Logistic Distribution [LLogis(
\alpha, \beta
)]S(t)=\frac{1}{1 + \left(\frac{t}{\beta}\right)^\alpha}
Logistic Distribution [Logis(
\mu,\beta
)]S(t)=\frac{e^{-\frac{t -\mu}{\beta}}}{1 + e^{-\frac{t - \mu}{\beta}}}
Log-Normal Distribution [LN(
\mu,\beta
)]S(t)=\int_{\frac{\log t - \mu}{\beta}}^\infty \!\frac{1}{\sqrt{2 \pi}}
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
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.
Package: | GofCens |
Type: | Package |
Version: | 1.1 |
Date: | 2024-07-29 |
License: | GPL (>= 2) |
Author(s)
Klaus Langohr, Mireia Besalú, Matilde Francisco, Guadalupe Gómez
Maintainer: Klaus Langohr <klaus.langohr@upc.edu>