plot.predict_roc: Plot predicted ROC curve

Description Usage Arguments Details Value Examples

View source: R/predict_roc.r

Description

Plot method for objects of class 'predict_roc'.

Usage

1
2
## S3 method for class 'predict_roc'
plot(x, thr = seq(-10, 10, length = 1000), rline = TRUE, ...)

Arguments

x

A 'predict_roc' object to plot.

thr

The sequence of thresholds parametrising the ROC curve, if this is a function. Default to a length 1000 sequence from -10 to 10.

rline

Logical, should the line of random discrimination be added to the plot? Defaults to TRUE.

...

Addtional arguments passed to plot.

Details

If neither 'xlab' nor 'ylab' is passed to plot the function supplies default x- and y-axis labels based on the type of ROC curve.

Value

Invisible.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Declare simulated data as metaSDTdata
metadata <- metaSDTdata(simMetaData, type1='resp', type2='conf', signal='S')

## Fit model to subset of data
fit <- metaSDTreg(A ~ signal,
            data=metadata,
            subset = m <= 20)

## Model-predicted signal-specific ROC curve
signalROC <- predict_roc(fit, type = 's')
plot(signalROC, type = 'l')

metaSDTreg documentation built on Jan. 13, 2021, 6:52 a.m.