Hamzah Hasyim
2018-Apr-08 00:01 UTC
[R] How to script the script sample into script "OR", please advice
Dear User R It's been a pleasure talking with you. I am newcomer use R. Would you please help me how to translate the script below to "R" script? * Area under receiver operating characteristic (AU-ROC) predict r1m1p, p roctab malaria r1m1p, graph summary * Area under receiver operating characteristic (AU-ROC) curve predict r1m2p, mu roctab malaria r1m2p, graph summary ************************************************************ ******************** * FIGURE 1 - AU-ROC ************************************************************ ******************** roccomp malaria r1m1p r1m2p, graph * Area under receiver operating characteristic (AU-ROC) predict r2m1p, p roctab malaria r2m1p, graph summary * Area under receiver operating characteristic (AU-ROC) curve predict r1m2p, mu roctab malaria r1m2p, graph summary ************************************************************ ******************** * FIGURE 3 - AU-ROC ************************************************************ ******************** roccomp malaria r2m1p r2m2p, graph Best regards, Hamzah Description of data-set ------------------------------------------------------------ ---------------------- storage display value variable name type format label variable label ------------------------------------------------------------ ---------------------- malaria float %48.0g malaria Participants who had diagnosed malaria by health professionals _est_r1m1 byte %8.0g esample() from estimates store r1m1p float %9.0g Pr(malaria) r1m2p float %9.0g Predicted mean r1m3p float %9.0g Predicted mean _est_r1m2 byte %8.0g esample() from estimates store r1m2use float %9.0g S.E. of empirical Bayes means for _cons[district] r1m2u float %9.0g empirical Bayes means for _cons[district] pickone byte %8.0g tag(district) r1m2urank float %9.0g rank of (r1m2u) _est_r1m3 byte %8.0g esample() from estimates store r1m3use float %9.0g S.E. of empirical Bayes means for _cons[district] r1m3u float %9.0g empirical Bayes means for _cons[district] r1m3urank float %9.0g rank of (r1m3u) _est_r2m1 byte %8.0g esample() from estimates store r2m1p float %9.0g Pr(malaria) r2m2p float %9.0g Predicted mean r2m3p float %9.0g Predicted mean _est_r2m2 byte %8.0g esample() from estimates store r2m2use float %9.0g S.E. of empirical Bayes means for _cons[district] r2m2u float %9.0g empirical Bayes means for _cons[district] r2m2urank float %9.0g rank of (r2m2u) _est_r2m3 byte %8.0g esample() from estimates store r2m3use float %9.0g S.E. of empirical Bayes means for _cons[district] r2m3u float %9.0g empirical Bayes means for _cons[district] r2m3urank float %9.0g rank of (r2m3u) ------------------------------------------------------------ ---------------------- Respectfully, Hamzah Hasyim, -------------- next part -------------- A non-text attachment was scrubbed... Name: rroctab.pdf Type: application/pdf Size: 206908 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20180408/96177a22/attachment-0022.pdf> -------------- next part -------------- A non-text attachment was scrubbed... Name: rroccomp.pdf Type: application/pdf Size: 250551 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20180408/96177a22/attachment-0023.pdf>
Bert Gunter
2018-Apr-08 14:41 UTC
[R] How to script the script sample into script "OR", please advice
1. *If* this is homework, we do not do homework here. 2. Please read and follow the posting guide linked below to get a useful answer. In general, we expect posters to provide code showing their attempt to solve the problem, rather than expecting to be provided complete solutions. See also instructions for providing a small reproducible example. 3. Search! e.g. on the rseek.org site, inputting "AUC" gave this, among others: https://www.r-bloggers.com/calculating-auc-the-area-under-a-roc-curve/ Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Apr 7, 2018 at 5:01 PM, Hamzah Hasyim <hamzah.hasyim at gmail.com> wrote:> Dear User R > > > It's been a pleasure talking with you. I am newcomer use R. Would you > please help me how to translate the script below to "R" script? > > > * Area under receiver operating characteristic (AU-ROC) > predict r1m1p, p > roctab malaria r1m1p, graph summary > > > * Area under receiver operating characteristic (AU-ROC) curve > predict r1m2p, mu > roctab malaria r1m2p, graph summary > > ************************************************************ > ******************** > * FIGURE 1 - AU-ROC > ************************************************************ > ******************** > > roccomp malaria r1m1p r1m2p, graph > > > * Area under receiver operating characteristic (AU-ROC) > predict r2m1p, p > roctab malaria r2m1p, graph summary > > > * Area under receiver operating characteristic (AU-ROC) curve > predict r1m2p, mu > roctab malaria r1m2p, graph summary > > > ************************************************************ > ******************** > * FIGURE 3 - AU-ROC > ************************************************************ > ******************** > roccomp malaria r2m1p r2m2p, graph > > > > Best regards, > > > > Hamzah > > Description of data-set > > ------------------------------------------------------------ > ---------------------- > storage display value > variable name type format label variable label > ------------------------------------------------------------ > ---------------------- > > malaria float %48.0g malaria Participants who had diagnosed > malaria by health > professionals > _est_r1m1 byte %8.0g esample() from estimates store > r1m1p float %9.0g Pr(malaria) > r1m2p float %9.0g Predicted mean > r1m3p float %9.0g Predicted mean > _est_r1m2 byte %8.0g esample() from estimates store > r1m2use float %9.0g S.E. of empirical Bayes means > for > _cons[district] > r1m2u float %9.0g empirical Bayes means for > _cons[district] > pickone byte %8.0g tag(district) > r1m2urank float %9.0g rank of (r1m2u) > _est_r1m3 byte %8.0g esample() from estimates store > r1m3use float %9.0g S.E. of empirical Bayes means > for > _cons[district] > r1m3u float %9.0g empirical Bayes means for > _cons[district] > r1m3urank float %9.0g rank of (r1m3u) > _est_r2m1 byte %8.0g esample() from estimates store > r2m1p float %9.0g Pr(malaria) > r2m2p float %9.0g Predicted mean > r2m3p float %9.0g Predicted mean > _est_r2m2 byte %8.0g esample() from estimates store > r2m2use float %9.0g S.E. of empirical Bayes means > for > _cons[district] > r2m2u float %9.0g empirical Bayes means for > _cons[district] > r2m2urank float %9.0g rank of (r2m2u) > _est_r2m3 byte %8.0g esample() from estimates store > r2m3use float %9.0g S.E. of empirical Bayes means > for > _cons[district] > r2m3u float %9.0g empirical Bayes means for > _cons[district] > r2m3urank float %9.0g rank of (r2m3u) > ------------------------------------------------------------ > ---------------------- > > > > > Respectfully, > > > > Hamzah Hasyim, > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >