Hi, I need to build ROC curve in R, can you please provide data steps / code or guide me through it. Thanks and Regards Rithesh M Mohan [[alternative HTML version deleted]]
search.r-project.org/cgi-bin/namazu.cgi?query=ROC&max=20&result=normal&sort=score&idxname=Rhelp02a&idxname=functions&idxname=docs there is a lot of help try help.search("ROC curve") gave Help files with alias or concept or title matching 'ROC curve' using fuzzy matching: granulo(ade4) Granulometric Curves plot.roc(analogue) Plot ROC curves and associated diagnostics roc(analogue) ROC curve analysis colAUC(caTools) Column-wise Area Under ROC Curve (AUC) DProc(DPpackage) Semiparametric Bayesian ROC curve analysis cv.enet(elasticnet) Computes K-fold cross-validated error curve for elastic net ROC(Epi) Function to compute and draw ROC-curves. lroc(epicalc) ROC curve cv.lars(lars) Computes K-fold cross-validated error curve for lars roc.demo(TeachingDemos) Demonstrate ROC curves by interactively building one HTH see the help and examples those will suffice Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'. Regards, Gaurav Yadav +++++++++++ Assistant Manager, CCIL, Mumbai (India) Mob: +919821286118 Email: emailtogauravyadav@gmail.com Bhagavad Gita: Man is made by his Belief, as He believes, so He is "Rithesh M. Mohan" <rithesh.m@brickworkindia.com> Sent by: r-help-bounces@stat.math.ethz.ch 07/26/2007 11:26 AM To <R-help@stat.math.ethz.ch> cc Subject [R] ROC curve in R Hi, I need to build ROC curve in R, can you please provide data steps / code or guide me through it. Thanks and Regards Rithesh M Mohan [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ===========================================================================================DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}
You might also want to try the ROCR package (rocr.bioinf.mpi-sb.mpg.de). Tutorial slides: rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt Overview paper: bioinformatics.oxfordjournals.org/cgi/content/full/21/20/3940 Good luck, Tobias On 7/26/07, Rithesh M. Mohan <rithesh.m at brickworkindia.com> wrote:> Hi, > > > > I need to build ROC curve in R, can you please provide data steps / code > or guide me through it. > > > > Thanks and Regards > > Rithesh M Mohan > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Tobias Sing Computational Biology and Applied Algorithmics Max Planck Institute for Informatics Saarbrucken, Germany Phone: +49 681 9325 315 Fax: +49 681 9325 399 tobiassing.net
Hi Ritesh ***please note Ritesh always mark a copy to the R-help mailing list :) *** Please visit this link to get help in R rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples (2/8): Precision/recall curves futher :) what do you mean by PSA and cohort :) after some googling i got this co·hort(khôrt) n. 1. A group or band of people. 2. A companion or associate. 3. A generational group as defined in demographics, statistics, or market research: "The cohort of people aged 30 to 39 . . . were more conservative" American Demographics. 4. a. One of the 10 divisions of a Roman legion, consisting of 300 to 600 men. b. A group of soldiers. and for PSA i got Prostate-specific antigen. A substance produced by the prostate that may be found in an increased amount in the blood of men who have prostate cancer, benign prostatic hyperplasia, or infection or inflammation of the prostate. Now please clarify what you want to model :) please dont take it otherwise i am not from biology field. Please clarify :) Regards, Gaurav Yadav +++++++++++ Assistant Manager, CCIL, Mumbai (India) Mob: +919821286118 Email: emailtogauravyadav@gmail.com Bhagavad Gita: Man is made by his Belief, as He believes, so He is "Rithesh M. Mohan" <rithesh.m@brickworkindia.com> 07/30/2007 01:30 PM To <gyadav@ccilindia.co.in> cc Subject Re: [R] ROC curve in R Hi Gaurav, Need your help, I’m relatively new to R or even stats, so can you please give me step by step details to get ROC curve in R. Requirement. To build ROC curve using only PSA(variable) alone of the original cohort against the ROC of the Model of the original cohort. It would be really great if you could help me with this. Thanks and Regards Rithesh ===========================================================================================DISCLAIMER AND CONFIDENTIALITY CAUTION: This message and any attachments with it (the "message") are confidential and intended solely for the addressees. Unauthorized reading, copying, dissemination, distribution or disclosure either whole or partial, is prohibited. If you receive this message in error, please delete it and immediately notify the sender. Communicating through email is not secure and capable of interception, corruption and delays. Anyone communicating with The Clearing Corporation of India Limited (CCIL) by email accepts the risks involved and their consequences. The internet can not guarantee the integrity of this message. CCIL shall (will) not therefore be liable for the message if modified. The recipient should check this email and any attachments for the presence of viruses. CCIL accepts no liability for any damage caused by any virus transmitted by this email. [[alternative HTML version deleted]]
Sorry Gaurav, I'll make sure I mark a copy to r-help also. As I have told, I'm new to R and even to statistics, so it will take some time for me to learn it. Just help me get a simple ROC curve, please give an example of your own and explain the steps, no mater if its biology or any other field, I just need to get the logic behind it. Thanks & Regards Rithesh M Mohan ________________________________ From: gyadav@ccilindia.co.in [mailto:gyadav@ccilindia.co.in] Sent: Monday, July 30, 2007 4:28 PM To: Rithesh M. Mohan Cc: r-help@stat.math.ethz.ch Subject: Re: [R] ROC curve in R Hi Ritesh ***please note Ritesh always mark a copy to the R-help mailing list :) *** Please visit this link to get help in R rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples (2/8): Precision/recall curves futher :) what do you mean by PSA and cohort :) after some googling i got this co·hort(khôrt) n. 1. A group or band of people. 2. A companion or associate. 3. A generational group as defined in demographics, statistics, or market research: "The cohort of people aged 30 to 39 . . . were more conservative" American Demographics. 4. a. One of the 10 divisions of a Roman legion, consisting of 300 to 600 men. b. A group of soldiers. and for PSA i got Prostate-specific antigen. A substance produced by the prostate that may be found in an increased amount in the blood of men who have prostate cancer, benign prostatic hyperplasia, or infection or inflammation of the prostate. Now please clarify what you want to model :) please dont take it otherwise i am not from biology field. Please clarify :) Regards, Gaurav Yadav +++++++++++ Assistant Manager, CCIL, Mumbai (India) Mob: +919821286118 Email: emailtogauravyadav@gmail.com Bhagavad Gita: Man is made by his Belief, as He believes, so He is "Rithesh M. Mohan" <rithesh.m@brickworkindia.com> 07/30/2007 01:30 PM To <gyadav@ccilindia.co.in> cc Subject Re: [R] ROC curve in R Hi Gaurav, Need your help, I'm relatively new to R or even stats, so can you please give me step by step details to get ROC curve in R. Requirement. To build ROC curve using only PSA(variable) alone of the original cohort against the ROC of the Model of the original cohort. It would be really great if you could help me with this. Thanks and Regards Rithesh ===========================================================================================DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}
Thanks Gaurav, I'll try this and get back to you. Rithesh M Mohan ________________________________ From: gyadav@ccilindia.co.in [mailto:gyadav@ccilindia.co.in] Sent: Monday, July 30, 2007 6:01 PM To: Rithesh M. Mohan Cc: r-help@stat.math.ethz.ch Subject: RE: [R] ROC curve in R Hi Ritesh, what i understad of ROC analysis will be coming in other mail :) excellent introduction can be found at csee.usf.edu/~candamo/site/papers/ROCintro.pdf rocr.bioinf.mpi-sb.mpg.de take this zip file :) rocr.bioinf.mpi-sb.mpg.de/ROCR_1.0-2.zip also ROCR and analogue R manual :) they are having good examples :) please read it in english with the papers given above then it would be really easy to interpret ROC curve. Just try to grasp a simple thing that what is on x axis and what is on y axis, further whether the values are in ascending or descending order. accordingly try to visualize how the ROC space has be analogly divided to give digital classification :) ########code starts here and taken from manual of nanalogue#################### library(analogue) ## continue the example from roc() example(roc) ## draw the ROC curve plot(swap.roc, 1) ## draw the four default diagnostic plots opar <- par(mfrow = c(2,2)) plot(swap.roc) par(opar) #################end of code snippet########################### ############R software working session##################> > ## draw the ROC curve > plot(swap.roc, 1) > > ## draw the four default diagnostic plots > opar <- par(mfrow = c(2,2)) > plot(swap.roc) > par(opar) > ## continue the example from roc() > example(roc)roc> ## continue the example from join() roc> example(join) join> ## load the example data join> data(swapdiat) join> data(swappH) join> data(rlgh) join> ## process so common set of columns for training and test join> ## number of training set samples join> n.train <- nrow(swapdiat) join> ## merge training and test set on columns join> dat <- join(swapdiat, rlgh, verbose = TRUE) Summary: Rows Cols Data set 1: 167 277 Data set 2: 101 139 Merged: 268 277 join> ## convert to proportions join> dat <- dat / 100 join> ## subset data back into training and test sets join> swapdiat <- dat[1:n.train, ] join> rlgh <- dat[(n.train+1):nrow(dat), ] roc> ## fit the MAT model using the squared chord distance measure roc> swap.mat <- mat(swapdiat, swappH, method = "SQchord") roc> ## fit the ROC curve to the SWAP diatom data using the MAT results roc> ## Generate a grouping for the SWAP lakes roc> clust <- hclust(as.dist(swap.mat$Dij), method = "ward") roc> grps <- cutree(clust, 12) roc> ## fit the ROC curve roc> swap.roc <- roc(swap.mat, groups = grps) roc> swap.roc ROC curve of dissimilarities Optimal Dissimilarity = 0.894 AUC = 0.889, p-value: < 2.22e-16 No. within: 1214 No. outside: 12647> > ## draw the ROC curve > plot(swap.roc, 1) > > ## draw the four default diagnostic plots > opar <- par(mfrow = c(2,2)) > plot(swap.roc) > par(opar) >##############end of demonstration session######################### Sorry Gaurav, I'll make sure I mark a copy to r-help also. As I have told, I'm new to R and even to statistics, so it will take some time for me to learn it. Just help me get a simple ROC curve, please give an example of your own and explain the steps, no mater if its biology or any other field, I just need to get the logic behind it. Thanks & Regards Rithesh M Mohan ________________________________ From: gyadav@ccilindia.co.in [mailto:gyadav@ccilindia.co.in] Sent: Monday, July 30, 2007 4:28 PM To: Rithesh M. Mohan Cc: r-help@stat.math.ethz.ch Subject: Re: [R] ROC curve in R Hi Ritesh ***please note Ritesh always mark a copy to the R-help mailing list :) *** Please visit this link to get help in R rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples (2/8): Precision/recall curves futher :) what do you mean by PSA and cohort :) after some googling i got this co·hort(khôrt) n. 1. A group or band of people. 2. A companion or associate. 3. A generational group as defined in demographics, statistics, or market research: "The cohort of people aged 30 to 39 . . . were more conservative" American Demographics. 4. a. One of the 10 divisions of a Roman legion, consisting of 300 to 600 men. b. A group of soldiers. and for PSA i got Prostate-specific antigen. A substance produced by the prostate that may be found in an increased amount in the blood of men who have prostate cancer, benign prostatic hyperplasia, or infection or inflammation of the prostate. Now please clarify what you want to model :) please dont take it otherwise i am not from biology field. Please clarify :) Regards, Gaurav Yadav +++++++++++ Assistant Manager, CCIL, Mumbai (India) Mob: +919821286118 Email: emailtogauravyadav@gmail.com Bhagavad Gita: Man is made by his Belief, as He believes, so He is "Rithesh M. Mohan" <rithesh.m@brickworkindia.com> 07/30/2007 01:30 PM To <gyadav@ccilindia.co.in> cc Subject Re: [R] ROC curve in R Hi Gaurav, Need your help, I'm relatively new to R or even stats, so can you please give me step by step details to get ROC curve in R. Requirement. To build ROC curve using only PSA(variable) alone of the original cohort against the ROC of the Model of the original cohort. It would be really great if you could help me with this. Thanks and Regards Rithesh ===========================================================================================DISCLAIMER AND CONFIDENTIALITY CAUTION: This message and any attachments with it (the "message") are confidential and intended solely for the addressees. Unauthorized reading, copying, dissemination, distribution or disclosure either whole or partial, is prohibited. If you receive this message in error, please delete it and immediately notify the sender. Communicating through email is not secure and capable of interception, corruption and delays. Anyone communicating with The Clearing Corporation of India Limited (CCIL) by email accepts the risks involved and their consequences. The internet can not guarantee the integrity of this message. CCIL shall (will) not therefore be liable for the message if modified. The recipient should check this email and any attachments for the presence of viruses. CCIL accepts no liability for any damage caused by any virus transmitted by this email. ===========================================================================================DISCLAIMER AND CONFIDENTIALITY CAUTION: This message and any attachments with it (the "message") are confidential and intended solely for the addressees. Unauthorized reading, copying, dissemination, distribution or disclosure either whole or partial, is prohibited. If you receive this message in error, please delete it and immediately notify the sender. Communicating through email is not secure and capable of interception, corruption and delays. Anyone communicating with The Clearing Corporation of India Limited (CCIL) by email accepts the risks involved and their consequences. The internet can not guarantee the integrity of this message. CCIL shall (will) not therefore be liable for the message if modified. The recipient should check this email and any attachments for the presence of viruses. CCIL accepts no liability for any damage caused by any virus transmitted by this email. [[alternative HTML version deleted]]