Thanks Gaurav,

 

I'll try this and get back to you.

 

Rithesh M Mohan

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
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  
http://www.csee.usf.edu/~candamo/site/papers/ROCintro.pdf 

http://rocr.bioinf.mpi-sb.mpg.de/ 

take this zip file :) 
http://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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
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 
http://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: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is 

"Rithesh M. Mohan" <[EMAIL PROTECTED]> 

07/30/2007 01:30 PM 



To

<[EMAIL PROTECTED]> 

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]]

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to