I really appreciate your help Prof Harrell! I followed your instruction and re-ran the second model without strat but with surv=TRUE, time.inc=30, and u=30 to validate, the Dxy was really the same as that in the first model output! But this confused me...shouldn't the Dxy be positive in this case because u was specified to estimate the concordance between surv prob and surv time???
> library(survival) > attach(colon) > S<-Surv(time,status) > obstruct0<-factor(obstruct) > perfor0<-factor(perfor) > adhere0<-factor(adhere) > differ0<-factor(differ) > extent0<-factor(extent) > node40<-factor(node4) > f2<-cph(S~obstruct0+perfor0+adhere0+differ0+extent0+node40,x=T,y=T,surv=T,time.inc=30) > set.seed(110221) > validate(f2,method="b",B=100,dxy=T,pr=F,u=30) index.orig training test optimism index.corrected n Dxy -0.2918 -0.2932 -0.2861 -0.0070 -0.2847 100 R2 0.1145 0.1191 0.1104 0.0088 0.1057 100 Slope 1.0000 1.0000 0.9626 0.0374 0.9626 100 D 0.0170 0.0178 0.0164 0.0014 0.0156 100 U -0.0002 -0.0002 0.0001 -0.0003 0.0001 100 Q 0.0172 0.0179 0.0162 0.0017 0.0155 100 g 0.5472 0.5590 0.5348 0.0242 0.5230 100 (the Dxy's of -0.54 or 0.6 were estimated from my own data and were not shown here because of the difficulty to produce codes that simulate my data, sorry for the confusion!) Best regards, Vikki -- View this message in context: http://r.789695.n4.nabble.com/Interpreting-the-example-given-by-Prof-Frank-Harrell-in-Design-validate-cph-tp3316820p3318554.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.