draw.prc | R Documentation |
Balancing concept by Yingzhou Wu and Fritz Roth (Wu et al, unpublished)
draw.prc(
yr2,
col = seq_along(yr2),
lty = 1,
monotonized = TRUE,
balanced = FALSE,
legend = "bottomleft",
...
)
yr2 |
the yogiroc2 object |
col |
vector of colors to use for the predictors |
monotonized |
whether or not to monotonized the curve |
balanced |
whether or not to use prior-balancing |
legend |
the position of the legend, e.g. "bottomleft". NA disables legend |
... |
additional graphical parameters (see |
nothing. draws a plot
#generate fake data
truth <- c(rep(TRUE,10),rep(FALSE,8))
scores <- cbind(
pred1=c(rnorm(10,1,0.2),rnorm(8,.9,0.1)),
pred2=c(rnorm(10,1.1,0.2),rnorm(8,.9,0.2))
)
#create yogiroc2 object
yrobj <- yr2(truth,scores)
#draw PRC curve
draw.prc(yrobj)
#draw non-monotonized PRC curve
draw.prc(yrobj,monotonized=FALSE)
#draw balanced PRC curve
draw.prc(yrobj,balanced=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.