Movatterモバイル変換


[0]ホーム

URL:


GofCens1.5

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

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

  • Kolmogorov-Smirnov, Cramér-von Mises, and Anderson-Darling tests, which use the empirical distribution function for complete data and are extended for 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.
  • A series of graphical tools such as probability or cumulative hazard plots to guide the decision about the most suitable parametric model for the 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 fromCRAN:

install.packages("GofCens")

Brief Example

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:

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))

Links

License

  • GPL (>= 2)

Citation

Developers

  • Klaus Langohr
    Author, maintainer
  • Mireia Besalú
    Author
  • Matilde Francisco
    Author
  • Arnau Garcia
    Author
  • Guadalupe Gómez
    Author

Dev status

  • CRAN_Status_Badge
  • Downloads
  • Download counter

[8]ページ先頭

©2009-2026 Movatter.jp