knitr::opts_chunk$set(echo = TRUE)
library(mROC) library(pROC) n<-100000
p<-rbeta(n,2,3) y<-rbinom(n,1,p) plot(roc(y,p)) lines(mROC(p),col="red")
p<-rbeta(n,2,3) y<-rbinom(n,1,p) odds<-p/(1-p) odds<-odds*3 p<-odds/(1+odds) plot(roc(y,p)) lines(mROC(p),col="red")
p<-rbeta(n,0.5,0.5)/10 y<-rbinom(n,1,p) odds<-p/(1-p) odds<-odds*10 p<-odds/(1+odds) plot(roc(y,p)) lines(mROC(p),col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.