The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

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

CRAN_Status_Badge Downloads Download counter

The GofCens package include the following graphical tools and goodness-of-fit tests for right-censored data:

These functions share several features as they can handle both complete and right-censored data, and they provide parameter estimates for the distributions under study.

Installation

GofCens can be installed from CRAN:

install.packages("GofCens")

Brief Example

To conduct goodness-of-fit tests with right censored data we can use the KScens(), CvMcens(), ADcens() and chisqcens() functions. We illustrate this by means of the colon dataset:

# Kolmogorov-Smirnov
set.seed(123)
KScens(Surv(time, status) ~ 1, colon, distr = "norm")

# Cramér-von Mises
colonsamp <- colon[sample(nrow(colon), 300), ]
CvMcens(Surv(time, status) ~ 1, colonsamp, distr = "normal")

# Anderson-Darling
ADcens(Surv(time, status) ~ 1, colonsamp, distr = "normal")

# Generalized chi-squared-type test
chisqcens(Surv(time, status) ~ 1, colonsamp, M = 6, distr = "normal")

The graphical tools provide nice plots via the functions cumhazPlot(), kmPlot() and probPlot(). See several examples using the nba data set:

data(nba)
cumhazPlot(Surv(survtime, cens) ~ 1, nba, distr = c("expo", "normal", "gumbel"))
kmPlot(Surv(survtime, cens) ~ 1, nba, distr = c("normal", "weibull", "lognormal"),
       prnt = FALSE)
probPlot(Surv(survtime, cens) ~ 1, nba, "lognorm", plots = c("PP", "QQ", "SP"),
         ggp = TRUE, m = matrix(1:3, nr = 1))

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.