plot.predict_roc: Plot predicted ROC curve

View source: R/predict_roc.r

plot.predict_rocR Documentation

Plot predicted ROC curve

Description

Plot method for objects of class 'predict_roc'.

Usage

## 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

## 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 March 31, 2023, 10:09 p.m.