Dear R users, I am a new R user and something stops me when I try to write a academic article. I want to make a nomogram to predict the risk of prostate cancer (PCa) using several factors which have been selected from the Logistic regression run under the SPSS. Always, a calibration plot is needed to validate the prediction accuracy of the nomogram. However, I tried many times and read a lot of posts with respect to this topic but I still couldn't figure out how to draw the nomogram and the calibration plot. My dataset and questions in detail are shown in two attached files. It will be very grateful if someone can save his/her time to help for my questions. Warmest regards! Ping Tang http://r.789695.n4.nabble.com/file/n3710068/Dataset.xls Dataset.xls http://r.789695.n4.nabble.com/file/n3710068/R_help.doc R_help.doc -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3710068.html Sent from the R help mailing list archive at Nabble.com.
How to make a nomogam and Calibration plot
6 messages · sytangping, Frank E Harrell Jr, zhu yao
Kindly do not attach questions in a separate document. Install and read the documentation for the R rms package, and see handouts at http://biostat.mc.vanderbilt.edu/rms Frank
sytangping wrote:
Dear R users, I am a new R user and something stops me when I try to write a academic article. I want to make a nomogram to predict the risk of prostate cancer (PCa) using several factors which have been selected from the Logistic regression run under the SPSS. Always, a calibration plot is needed to validate the prediction accuracy of the nomogram. However, I tried many times and read a lot of posts with respect to this topic but I still couldn't figure out how to draw the nomogram and the calibration plot. My dataset and questions in detail are shown in two attached files. It will be very grateful if someone can save his/her time to help for my questions. Warmest regards! Ping Tang http://r.789695.n4.nabble.com/file/n3710068/Dataset.xls Dataset.xls http://r.789695.n4.nabble.com/file/n3710068/R_help.doc R_help.doc
----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3710126.html Sent from the R help mailing list archive at Nabble.com.
1 day later
Dear Harrell, Many thanks for your quick response! However, after try and try, I still have difficulty to solve my questions. I post my questions again. I hope someone can help me run the data and draw the nomogram and calibration plot for me. I know that is not good but indeed I have no way to go. The problems almost drove me mad! Best regards! Ping Tang Dear R users, I am a new R user and something stops me when I try to write a academic article. I want to make a nomogram to predict the risk of prostate cancer (PCa) using several factors which have been selected from the Logistic regression run under the SPSS. Always, a calibration plot is needed to validate the prediction accuracy of the nomogram. However, I tried many times and read a lot of posts with respect to this topic but I still couldn't figure out how to draw the nomogram and the calibration plot. Attached file is the dataset for the research. It will be very grateful if someone can save his/her time to help for my questions. Warmest regards! Logistic Regression Classification Tablea,b Observed Predicted Pca-YN Percentage Correct 0 1 Step 0 Pca-YN 0 295 0 100.0 1 218 0 .0 Overall Percentage 57.5 Variables in the Equation B S.E. Wald df Sig. Exp(B) 95.0% C.I.for EXP(B) Lower Upper Step 1a Age .031 .015 4.491 1 .034 1.032 1.002 1.062 DRE 1.173 .266 19.492 1 .000 3.233 1.920 5.443 LogPV -2.857 .509 31.532 1 .000 .057 .021 .156 LogPSA 2.316 .246 88.416 1 .000 10.132 6.253 16.419 Constant -1.024 1.273 .648 1 .421 .359 The equation: Probability = e-1.024+0.31age+1.173DRE+-2.857LogPV+2.316LogPSA 1+e-1.024+0.31age+1.173DRE+-2.857LogPV+2.316LogPSA My questions are, 1.How to draw a nomogram (similar to the below figure 1) to predict the probability of cancer using R? 2. How to make the Calibration plot (similar to the below figure 2) which used to validate the prediction accuracy of the nomogram using R? And how to calculate the concordance index (C-index) ? http://r.789695.n4.nabble.com/file/n3714477/untitled.jpg http://r.789695.n4.nabble.com/file/n3714477/%E9%99%84%E4%BB%B62.jpg http://r.789695.n4.nabble.com/file/n3714477/Dataset.xls Dataset.xls -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3714477.html Sent from the R help mailing list archive at Nabble.com.
The nomogram you included was produced by the Design package, the precursor to the rms package. You will have to take the time to intensively read the rms package documentation. Note that how you developed the model (e.g., allowing for non-linearity in log PSA, not using stepwise regression which invalidates the results, making sure all clinically relevant predictors are in the model, ...) is the most important step. The process you are going through generally requires an M.S. in biostatistics. Frank
sytangping wrote:
Dear Harrell, Many thanks for your quick response! However, after try and try, I still have difficulty to solve my questions. I post my questions again. I hope someone can help me run the data and draw the nomogram and calibration plot for me. I know that is not good but indeed I have no way to go. The problems almost drove me mad! Best regards! Ping Tang Dear R users, I am a new R user and something stops me when I try to write a academic article. I want to make a nomogram to predict the risk of prostate cancer (PCa) using several factors which have been selected from the Logistic regression run under the SPSS. Always, a calibration plot is needed to validate the prediction accuracy of the nomogram. However, I tried many times and read a lot of posts with respect to this topic but I still couldn't figure out how to draw the nomogram and the calibration plot. Attached file is the dataset for the research. It will be very grateful if someone can save his/her time to help for my questions. Warmest regards! Logistic Regression Classification Tablea,b Observed Predicted Pca-YN Percentage Correct 0 1 Step 0 Pca-YN 0 295 0 100.0 1 218 0 .0 Overall Percentage 57.5 Variables in the Equation B S.E. Wald df Sig. Exp(B) 95.0% C.I.for EXP(B) Lower Upper Step 1a Age .031 .015 4.491 1 .034 1.032 1.002 1.062 DRE 1.173 .266 19.492 1 .000 3.233 1.920 5.443 LogPV -2.857 .509 31.532 1 .000 .057 .021 .156 LogPSA 2.316 .246 88.416 1 .000 10.132 6.253 16.419 Constant -1.024 1.273 .648 1 .421 .359 The equation: Probability = e-1.024+0.31age+1.173DRE+-2.857LogPV+2.316LogPSA 1+e-1.024+0.31age+1.173DRE+-2.857LogPV+2.316LogPSA My questions are, 1.How to draw a nomogram (similar to the below figure 1) to predict the probability of cancer using R? 2. How to make the Calibration plot (similar to the below figure 2) which used to validate the prediction accuracy of the nomogram using R? And how to calculate the concordance index (C-index) ? http://r.789695.n4.nabble.com/file/n3714477/untitled.jpg http://r.789695.n4.nabble.com/file/n3714477/%E9%99%84%E4%BB%B62.jpg http://r.789695.n4.nabble.com/file/n3714477/Dataset.xls Dataset.xls
----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3715336.html Sent from the R help mailing list archive at Nabble.com.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110804/025af540/attachment.pl>
I want to add a comment related to the calibration plot that was presented in a previous post (which probably cannot be done optimally in SPSS). The plot lacks sufficient resolution in the x-axis values that are calibrated. It is far better to use loess to estimate a smooth nonparametric calibration curve, with no (arbitrary) binning of x. And it is not adequate to validate only the 3-4 points that were plotted. Frank
yz wrote:
Nomogram is user-friendly, but the equation is also acceptable. It should be kept in mind that the process of model development really counts. BTW: You can calculate C-index (AUC) in SPSS. Calibration plot can also be plotted (may be manually) from the result of SPSS. *Yao Zhu* *Department of Urology Fudan University Shanghai Cancer Center Shanghai, China* 2011/8/1 sytangping <surgeon666666 at yahoo.com.cn>
Dear R users, I am a new R user and something stops me when I try to write a academic article. I want to make a nomogram to predict the risk of prostate cancer (PCa) using several factors which have been selected from the Logistic regression run under the SPSS. Always, a calibration plot is needed to validate the prediction accuracy of the nomogram. However, I tried many times and read a lot of posts with respect to this topic but I still couldn't figure out how to draw the nomogram and the calibration plot. My dataset and questions in detail are shown in two attached files. It will be very grateful if someone can save his/her time to help for my questions. Warmest regards! Ping Tang http://r.789695.n4.nabble.com/file/n3710068/Dataset.xls Dataset.xls http://r.789695.n4.nabble.com/file/n3710068/R_help.doc R_help.doc -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3710068.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ 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.
[[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.
----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-a-nomogam-and-Calibration-plot-tp3710068p3717519.html Sent from the R help mailing list archive at Nabble.com.