GofCens-package | R Documentation |
This package provides both graphical tools and goodness-of-fit tests for analyzing complete and right-censored data. It includes:
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.
Generalized chi-squared-type test, which is based on the squared differences between observed and expected counts using random cells with right-censored data.
Graphical tools, such as probability and cumulative hazard plots, to help guide decisions about the most appropriate parametric model for the data.
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.
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 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) |
Klaus Langohr, Mireia Besalú, Matilde Francisco, Arnau Garcia, Guadalupe Gómez
Maintainer: Klaus Langohr <klaus.langohr@upc.edu>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.