[R] relation between tdrocc AUC and c-statistic from rcorr.cens

2011-06-21 Thread North, Bernard V
I am using the rcorr.cens function from the Hmisc package and the 
time-dependent ROC curve obtained using tdrocc in the survcomp package.

I understand that the C statistic from rcorr.cens has to be subtracted from 1 
if high values of the risk variable lower survival.
Given that I wonder what the connection is between that C statistic and the AUC 
from the tdrocc object.  If they are substantially different are there any 
views on which one is to be preferred ?

Many thanks in advance

[[alternative HTML version deleted]]

__
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.


[R] C-statistics (AUCs) from rcorr.cens or survcomp time-dependent ROC curves

2011-03-25 Thread North, Bernard V
I am using the rcorr.cens function from the Hmisc package and the 
time-dependent ROC curve obtained using tdrocc in the survcomp package.

I understand that the C statistic from rcorr.cens has to be subtracted from 1 
if high values of the risk variable lower survival.
Given that I wonder what the connection is between that C statistic and the AUC 
from the tdrocc object. Are they expected to be the same ?
Many thanks in advance


[[alternative HTML version deleted]]

__
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.


[R] confidence intervals for Harrell's c-index in survival setting

2010-08-17 Thread North, Bernard V
Dear All,

Is it possible to get confidence intervals for Harrell's concordance index or, 
equivalently, Somer's D using the rms package or in some other way ?
I have survival data it would be the c-index in the Cox model setting

Many thanks




Dr Bernard North
Statistical Consultant
Statistical Advisory Service
Advice and Courses on Research Design and Methodology
Imperial College South Kensington Campus
8 Princes Gardens Room 845, 4th Floor

London SW7 1NA.

Tel: 020 7594 2034
Fax: 020 7594 1489
Email: bno...@imperial.ac.ukmailto:bno...@imperial.ac.uk
Web:  www.ic.ac.uk/stathelphttp://www.ic.ac.uk/stathelp


[[alternative HTML version deleted]]

__
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.


[R] output (p-values) of fastbw in Design package

2009-10-27 Thread North, Bernard V
I am using the validate option in the Design package with the Cox survival 
model.
I am using the bw=T option which, like the fastbw function, performs a backward 
elimination variable selection
The output includes a series of columns (below) giving information on 
eliminated variables.
My question is that I am unsure of the difference between the 2 p-values given 
(the one after Chi-Sq and the one after df)
This may be a gap in my statistics knowledge, hopefully I've not asked too 
silly a question, many thanks in advance

Backwards Step-down - Original Model

 DeletedChi-Sq d.f. P  Residual d.f. P  AIC

[[alternative HTML version deleted]]

__
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.


[R] using axis.Date with interaction.plot

2009-10-13 Thread North, Bernard V
Dear List

I want to plot multiple time series (several outcomes) with dates at intervals 
on the x axis and a legend.

Is it possible to use axis.Date to get dates, at intervals in  my case, on the 
x axis of a (multiple) time series plot.
The axis.Date in the code below doesn't produce any dates on the x axis. (The 
difference outcome measures are all variable outcome in dataframe speclong and 
the  different groups correspond to different values of the variable time with 
values 1 to 8)

But the same axis.Date command gives x axis Dates perfectly if following an 
ordinary plot command. So I suppose I could do that and add time series for 
successive time series using lines( but then I wouldn't have a legend or I'd 
have to create one manually

Many thanks for any advice

Bernard

speclong
  Date time outcome id
1.1 1998-01-291 8.11879e-13  1
2.1 1998-02-171 9.11297e-13  2
3.1 1998-03-201 4.95558e-13  3
4.1 1998-05-071 4.34171e-13  4
5.1 1998-05-261 2.41658e-13  5
6.1 1998-06-051 4.89529e-13  6

82.8 2005-07-158 2.37023e-11 82
83.8 2005-08-238 3.52766e-11 83
84.8 2005-09-088 1.98099e-11 84
85.8 2005-10-188 2.93576e-11 85
86.8 2005-11-188 6.30531e-11 86
87.8 2005-12-018 5.71245e-11 87
 interaction.plot(speclong$Date,speclong$time,speclong$outcome,log=y,xaxt=n,col=rainbow(8)
  )
 axis.Date(1,at=(as.Date(1998-01-01) +c(0:7)*365.25),format=%d/%m/%y, 
 las=2)

 sessionInfo()
R version 2.9.0 (2009-04-17)
i386-pc-mingw32

locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United 
Kingdom.1252;LC_MONETARY=English_United 
Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

[[alternative HTML version deleted]]

__
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.


Re: [R] Nagelkerkes R2N

2009-07-15 Thread North, Bernard V


I am interested Andrea is whether you ever established why your R2 was 1.
I have had a similar situation previously.

My main issue though, which I'd be v grateful for advice on, is why I am 
obtaining such  negative values -0.3  for Somers Dxy  using validate.cph from 
the Design package given my value of Nagelkerke R2 is not so low 13.2%.

I have this output when fitting 6 variables all with p-values0.01
I am wondering what the interpretation should be.
I know my Nagelkerke R2 isn't very good but I compare my results with the 
example from ?validate.cph and although I have a better R2 (13% v 9%) the 
Somers dxy from the example data set is much better, 38%, so certainly not 
negative !

 So my main question is : Why such a difference between explained variation, 
R2, and predictive ability: somers dxy ??

Obs Events Model L.R.   d.f.  P  ScoreScore P R2
   471228  66.36  6  0  73.41  0
  0.132



  validate(f, B=150,dxy=T)   # normally B=150

 index.orig  training test optimism index.corrected   n
Dxy   -0.3022537331 -0.3135032097 -0.292492573 -0.021010636   -0.2812430968 150
R2 0.1319445685  0.1431179294  0.122599605  0.0205183240.1114262446 150
Slope  1.00  1.00  0.923340558  0.0766594420.9233405576 150
D  0.0250864459  0.0276820092  0.023163167  0.0045188420.0205676038 150
U -0.0007676033 -0.0007725071  0.000610456 -0.0013829630.0006153598 150
Q  0.0258540493  0.0284545164  0.022552711  0.0059018050.0199522440 150


I also calculated the Schemper and Henderson V measure and obtained v=10.5%

I was  using the surev package of Lusa Lara; Miceli Rosalba; Mariani 
LuigiEstimation of predictive accuracy in survival analysis using R and 
S-PLUS.http://www.biomedexperts.com/Abstract.bme/17601627/Estimation_of_predictive_accuracy_in_survival_analysis_using_R_and_S-PLUS
Computer methods and programs in biomedicine 2007;87(2):132-7.
And my code was
library(surev)
pred.accuracy-f.surev(f)
pred.accuracy

sorry if my question isn't clear - should I have included my sessionInfo for a 
methodological question ? (I'm a newbie)
many thanks for any advice

[[alternative HTML version deleted]]

__
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.


[R] negative Somers D from Design package

2009-07-15 Thread North, Bernard V
Dear R help

My problem is very similar to the analysis detailed here.
If we use the mayo dataset provided with the survivalROC package the estimate 
for Somer's Dxy is very negative -0.56.
The Nagelkerke R2 is positive though 0.32.
I know there is a difference between explained variation and predictive ability 
but I am surprised there is usch a difference given that even a non predictive 
model should have Dxy around 0.
Am I doing something wrong or is there an interpretation that makes sense ?

This is with the mayo data so its reproducible but the result with my data is 
very similar.
Many thanks in advance

library(survivalROC)
library(Design)
library(survival)
data(mayo)

 Sm - Surv(mayo$time,mayo$censor)
fm - cph( Sm ~ mayoscore4,mayo,x=T,y=T,surv=T )
validate(fm, B=150,dxy=T)
Iteration 1 

index.orig training test  optimism index.corrected   n
Dxy   -0.566027923 -0.55407 -0.566027923 -0.0006374833-0.565390440 150
R2 0.325860603  0.327350885  0.325860603  0.0014902826 0.324370320 150
Slope  1.0  1.0  0.987854765  0.0121452354 0.987854765 150
D  0.093398440  0.095166239  0.093398440  0.0017677983 0.091630642 150
U -0.001562582 -0.001579618  0.001150175 -0.0027297932 0.001167211 150
Q  0.094961022  0.096745857  0.092248266  0.0044975915 0.090463431 150



Dr Bernard North
Statistical Consultant
Statistical Advisory Service
Advice and Courses on Research Design and Methodology
Imperial College
South Kensington Campus
Room 845, 4th Floor
8 Princes Gardens
London SW7 1NA.

Tel: 020 7594 2034
Fax: 020 7594 1489
Email: bno...@imperial.ac.uk
Web:  www.ic.ac.uk/stathelp




[[alternative HTML version deleted]]

__
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.