performance_style: Rearrange Simulation Results in Order to Plot Them

Description Usage Arguments Value See Also Examples

View source: R/fun_replicate-simulation-for-roc.R

Description

This function takes as input the output from predict_style and rearranges this output so that it can subsequently be used by the plotting function of the ROCR package (plot.performance). Conversely to traditional ROC-analyses, which employ two measures (e.g., TPR and FPR), this function returns output to plot only one of these measures (e.g., TPR).

Usage

1

Arguments

x

Character. One of "TPR", "FPR", "ACC", or "PREC".

dat

List. The output from predict_style.

Value

An S4 object of the ROCR-class performance.

See Also

The package ROCR and its performance-class.

Examples

1
2
3
4
5
6
7
8
## Not run: 
res_1 <- predict_style(reps = 5, style = "ARS")
res_2 <- performance_style("ACC", res_1)
ROCR::plot(res_2)
ROCR::plot(res_2, avg="vertical", spread.estimate="stddev",
           show.spread.at=seq(.1, .9, length=9))

## End(Not run)

hplieninger/stylesim documentation built on May 16, 2017, 12:57 a.m.