Dear UseR, I do not know if this a problem with me, my data or cph/survest in package design. The example below works with a standard data set, but not with my data, but I cannot locate the problem.
Note that I am using an older package of survival to avoid a problem with the newly renamed function in survival meeting Design. Dieter # First, check standard example to make sure library(Design) data(ovarian) dd = datadist(ovarian) options(datadist="dd") ovarian$rx = as.factor(ovarian$rx) cp = cph(Surv(futime,fustat)~rx,data=ovarian,surv=TRUE,x=TRUE,y=TRUE) summary(cp) # works ok survest(cp,levels(ovarian$rx),times=500) # Small data set, 223 rows, 3650 bytes cc = read.table("http://www.menne-biomed.de/uni/cc.csv",header=TRUE) #cc = read.table("cc.csv",header=TRUE) dd = datadist(cc) cp = cph(Surv(DaysToEvent,event)~ITTGroup,data=cc,surv=TRUE,x=TRUE,y=TRUE) survest(cp,levels(cc$ITTGroup),times=100) #Error in survfit.cph(list(coefficients = c(0.435291247251185, -0.143015493753166 : # NA/NaN/Inf in foreign function call (arg 13) #In addition: Warning message: #NAs introduced by coercion #------------------- summary(cc) DaysToEvent event ITTGroup Min. : 3.0 Mode :logical Anti:76 1st Qu.: 22.0 FALSE:89 Con :76 Median : 70.0 TRUE :134 Pla :71 Mean :108.3 NA's :0 3rd Qu.:224.0 Max. :261.0 #-------------------------------- > sessionInfo() R version 2.9.0 Under development (unstable) (2009-03-13 r48127) i386-pc-mingw32 locale: LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=Germ an_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 attached base packages: [1] splines stats graphics grDevices datasets utils methods base other attached packages: (Note: older version of survival to avoid problems with Design) [1] Design_2.1-2 survival_2.34 Hmisc_3.5-2 loaded via a namespace (and not attached): [1] cluster_1.11.12 grid_2.9.0 lattice_0.17-20 tools_2.9.0 > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.