Description Usage Arguments Details Value Author(s) References See Also Examples
gofcens
computes the Kolmogorov-Smirnov, Crámer-von Mises, and
Anderson-Darling statistics for complete and right-censored data against
eight possible distributions.
1 2 3 4 5 6 |
times |
Numeric vector of times until the event of interest. |
cens |
Status indicator (1, exact time; 0, right-censored time). If not provided, all times are assumed to be exact. |
distr |
A string specifying the name of the distribution to be studied.
The possible distributions are the exponential ( |
betaLimits |
Two-components vector with the lower and upper bounds of the Beta distribution. This argument is only required, if the beta distribution is considered. |
igumb |
Two-components vector with the initial values for the estimation of the Gumbel distribution parameters. |
degs |
Integer indicating the number of decimal places of the numeric results of the output. |
params |
List specifying the parameters of the theoretical distribution.
By default, parameters are set to |
Fleming et al. (1980) proposed a modified Kolmogorov-Smirnov test to be used with right-censored data. Koziol and Green (1976) proposed a Crámer-von Mises statistic for randomly censored data. This function reproduces this test for a given survival data and a theorical distribution. In presence of ties, different authors provide slightly different definitions of the product-limit estimator, what might provide different values of the test statistic.
When dealing with complete data, we recommend the use of functions
ks.test
of the stats package and
cvm.test
and ad.test
of
the goftest package.
A list containing the following components
|
Values of the Kolmogovor-Smirnov, Crámer-von Mises, and Anderson-Darling test statistics |
|
Null distribution |
|
List with the maximum likelihood estimates of the parameters of the distribution under study. |
K. Langohr, M. Besalú, G. Gómez.
T. R. Fleming et al. Modified Kolmogorov-Smirnov test procedure with application to arbitrarily right-censored data. In: Biometrics 36 (1980), 607-625.
J. A. Koziol and S. B. Green. A Crámer-von Mises statistic for randomly censored data. In: Biometrika, 63 (3) (1976), 465-474.
A. N. Pettitt and M. A. Stephens. Modified Crámer-von Mises statistics for censored data. In: Biometrika, 63 (2) (1976), 291-298.
ks.test (Package stats
), cvm.test
(Package goftest
), and ad.test
(Package goftest
) for complete data, and KScens for the
Kolmogorov-Smirnov test for right-censored data, which returns the p-value.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.