TheGofCens 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.
To conduct goodness-of-fit tests with right censored data we can use theKScens(),CvMcens(),ADcens() andchisqcens() functions. We illustrate this by means of thecolon dataset:
# Kolmogorov-Smirnovset.seed(123)KScens(Surv(time,status)~1,colon, distr="norm")# Cramér-von Misescolonsamp<-colon[sample(nrow(colon),300),]CvMcens(Surv(time,status)~1,colonsamp, distr="normal")# Anderson-DarlingADcens(Surv(time,status)~1,colonsamp, distr="normal")# Generalized chi-squared-type testchisqcens(Surv(time,status)~1,colonsamp, M=6, distr="normal")The graphical tools provide nice plots via the functionscumhazPlot(),kmPlot() andprobPlot(). See several examples using thenba data set: