Hi Mario, On Sun, Dec 5, 2010 at 10:11 AM, <petre...@unina.it> wrote: > > I have the same problem of a previous request > > HOW to use the survivalROC (or another library in R) to get optimal cut-off > values? > > I want to use the time-dependent survivalROC package.according to > the,reference > material,it only gives a partial set of ordered cut-off values .eg.
I'm not exactly sure how to parse that sentence. Do you mean you are trying to follow the reference, but only get a partial set of cut-off values? Or do you mean that according to the reference, it only gives a partial set of ordered cut-off values? > -------------------------------------------------------------------------------- > > data(mayo) > str(mayo) > attach(mayo) > ROC.1=survivalROC(Stime=time,status=censor,marker=mayoscore4,predict.time=365,lambda=0.05) > str(ROC.1) this prints the str()ucture of the ROC.1 object to the console so you can see how the object is stored in R > > plot(ROC.1$FP, ROC.1$TP, type="l", xlim=c(0,1), ylim=c(0,1), xlab=paste( > "FP", "\n", > "AUC = ",round(ROC.1$AUC,3)), ylab="TP",main="Mayoscore 4, Method = NNE \n > Year = 1") > abline(0,1) > > List of 6 > $ cut.values : num [1:313] -Inf 4.58 4.9 4.93 4.93 ... *only 5 values > > * $ TP : num [1:313] 1 0.999 0.999 0.999 0.998 ... > > $ FP : num [1:313] 1 0.997 0.993 0.99 0.987 ... > $ predict.time: num 365 > $ Survival : num 0.93 > > $ AUC : num 0.888 This is the output you should have gotten from str(ROC.1) > -------------------------------------------------------------------------------- > In particular I'm unable to see and print all values after str(ROC.1) > and NOT only the 5 values listed above in the example in order to to get > optimal cut-off values Is this what you are looking for? ROC.1[["cut.values"]] or are you have some other problem? > > Thank you very much! > > > > Mario Petretta > Dipartimento di Medicina Clinica Scienze Cardiovascolari e Immunologiche > Facoltà di Medicina e Chirurgia > Università di Napoli Federico II > 081 - 7462233 > > > > Mario Petretta > Dipartimento di Medicina Clinica Scienze Cardiovascolari e Immunologiche > Facoltà di Medicina e Chirurgia > Università di Napoli Federico II > 081 - 7462233 > > ______________________________________________ > 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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.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.