GofCens-package.RdThis 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:
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.
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.
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.
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.5 |
| Date: | 2025-05-22 |
| License: | GPL (>= 2) |