Hello all, I am very new to R and i am facing two problems. First i didn't succeed changing the konsole language in english even after trying the line command set language='en'. I would like to plot ROC curves. I have a serie of 10 threshold tests that i do for 10 patients. The prediction for the patients is always the same but the status can change given to the considered threshold. I have 11 columns of 10 rows, the first colums containing the10 lines of the predicted status of the patients (0=cured, 1=non cured). Then follow 10 columns (10 thresholds) containing the found status using the threshold. Please do someone know how i can use those values with R to plot ROC curves? I thank you for your understanding, Josiane. "Everything should be made as simple as possible, but not simpler." Albert Einstein. [[alternative HTML version deleted]]
Hi Josiane, Concerning ROC curves, the package ROCR should do what you want to do. Use install.packages to add it to you library. Getting you data into a text file format, use read.delim to read into an data frame. Once you have a data frame, you can use the methods in ROCR to analyze the data. Best, Corey On Mon, Jan 30, 2012 at 1:52 AM, Josiane NJIWA <joad24@yahoo.com> wrote:> > > Hello all, > > I am very new to R and i am facing two problems. First i didn't succeed > changing the konsole language in english even after trying the line command > set language='en'. > I would like to plot ROC curves. I have a serie of 10 threshold tests that > i do for 10 patients. The prediction for the patients is always the same > but the status can change given to the considered threshold. > I have 11 columns of 10 rows, the first colums containing the10 lines of > the predicted status of the patients (0=cured, 1=non cured). Then follow 10 > columns (10 thresholds) containing the found status using the threshold. > Please do someone know how i can use those values with R to plot ROC > curves? > > I thank you for your understanding, > > Josiane. > > > "Everything should be made as simple as possible, but not simpler." > Albert Einstein. > [[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. >-- *The mark of a successful man is one that has spent an entire day on the bank of a river without feeling guilty about it.* [[alternative HTML version deleted]]
On Jan 30, 2012, at 4:52 AM, Josiane NJIWA wrote:> > > Hello all, > > I am very new to R and i am facing two problems. First i didn't > succeed changing the konsole language in english even after trying > the line command set language='en'.R is a functional language, so it shouldn't surprise you that issuing a "command" does not do what you apparently expected based on your experience with macro languages. You should read: ?locales> I would like to plot ROC curves. I have a serie of 10 threshold > tests that i do for 10 patients. The prediction for the patients is > always the same but the status can change given to the considered > threshold. > I have 11 columns of 10 rows, the first colums containing the10 > lines of the predicted status of the patients (0=cured, 1=non > cured). Then follow 10 columns (10 thresholds) containing the found > status using the threshold. > Please do someone know how i can use those values with R to plot ROC > curves? > > I thank you for your understanding, > > Josiane. > > > "Everything should be made as simple as possible, but not > simpler." Albert Einstein. > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.David Winsemius, MD Heritage Laboratories West Hartford, CT
On 01/30/2012 08:52 PM, Josiane NJIWA wrote:> > > Hello all, > > I am very new to R and i am facing two problems. First i didn't succeed changing the konsole language in english even after trying the line command set language='en'. > I would like to plot ROC curves. I have a serie of 10 threshold tests that i do for 10 patients. The prediction for the patients is always the same but the status can change given to the considered threshold. > I have 11 columns of 10 rows, the first colums containing the10 lines of the predicted status of the patients (0=cured, 1=non cured). Then follow 10 columns (10 thresholds) containing the found status using the threshold. > Please do someone know how i can use those values with R to plot ROC curves? >Hi Josiane, The function roc.from.table in the "epicalc" package will produce a basic ROC curve. You will have to get the table that you send to the function in the correct form. I think you will have to lay out the table like this: Predicted Above threshold Threshold1 x x Threshold2 x x Threshold3 x x Threshold4 x x Threshold5 x x Threshold6 x x Threshold7 x x Threshold8 x x Threshold9 x x Threshold10 x x I may be quite wrong as I don't know exactly what the successive threshold values may mean. You will probably want to run the function with grid=FALSE. Jim