[R] contrasting Somer's D from Design package

vikkiyft s067835 at alumni.cuhk.net
Sat Feb 19 15:32:47 CET 2011


Dear R help,

I am having a problem with the Design package and my problem is detailed
here.

I fit a cox model to my data and validate the Somer's Dxy using the Design
package.
(Because of computation time problem, i only try 10 bootstrap samples for
the time being)

This is the model without stratification:
> library(Design)
> cox1a<-cph(surv.obj~factor(ecog)+factor(grade)+factor(tumor)+factor(extra),x=T,y=T)
> coef1a<-coef(cox1a)
> coef1a
    ecog=1      ecog=2       grade=2       grade=3      tumor=2      tumor=3    
extra=1 
  0.3578954   0.8993140   0.4834090   0.5716166   0.7600330   1.5974558  
0.8112942
> validate(cox1a,dxy=T,method="b",B=10)
         index.orig      training          test      optimism
index.corrected  n
Dxy   -5.450122e-01 -5.434214e-01 -5.437194e-01  2.979857e-04  
-5.453102e-01 10
R2     4.470271e-01  4.470172e-01  4.458043e-01  1.212920e-03   
4.458142e-01 10
Slope  1.000000e+00  1.000000e+00  9.910835e-01  8.916521e-03   
9.910835e-01 10
D      5.315241e-02  5.346057e-02  5.295422e-02  5.063561e-04   
5.264606e-02 10
U     -4.651872e-05 -4.677365e-05  2.708456e-05 -7.385821e-05   
2.733949e-05 10
Q      5.319893e-02  5.350735e-02  5.292713e-02  5.802143e-04   
5.261872e-02 10

But if I fit a stratified cox model to the same data, the result becomes:
> cox1b<-cph(surv.obj~factor(ecog)+factor(grade)+factor(tumor)+factor(extra)+strat(ft),x=T,y=T,surv=T)
> coef1b<-coef(cox1b)
> coef1b
    ecog=1      ecog=2       grade=2       grade=3      tumor=2      tumor=3    
extra=1 
   0.1058620   0.5074692   0.3190904   0.4728515   0.5631035   1.2190005  
0.3500670 
> validate(cox1a,dxy=T,method="b",B=10,u=12) #for whatever u values I try,
> similar result is returned
         index.orig      training       test     optimism index.corrected  n
Dxy    6.004062e-01  5.469688e-01 0.54184724  0.005121538     0.595284689 10
R2     1.702137e-01  4.463073e-01 0.16343334  0.282873951    -0.112660217 10
Slope  1.000000e+00  1.000000e+00 0.64516984  0.354830161     0.645169839 10
D      2.110517e-02  6.405669e-02 0.02018354  0.043873150    -0.022767980 10
U     -5.878953e-05 -5.625082e-05 0.00600501 -0.006061261     0.006002471 10
Q      2.116396e-02  6.411294e-02 0.01417853  0.049934410    -0.028770451 10

The coefficients are different between the models, but the relative
magnitudes among the coefficients in each model are in fact quite stable. I
expect the results would be somewhat similar, yet the two models give
totally contrasting Dxy, one very negative and the other very positive. Also
the corrected R2 of the stratified model is negative, which is impossible.
Is there something wrong or is there a sensible interpretation for this?

Many thanks in advance.


Best regards,
Vikki
-- 
View this message in context: http://r.789695.n4.nabble.com/contrasting-Somer-s-D-from-Design-package-tp3314217p3314217.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list