metaSDTreg (version 0.2.1)

plot.predict_roc: Plot predicted ROC curve

Description

Plot method for objects of class 'predict_roc'.

Usage

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

Value

Invisible.

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.

Examples

Run this code
## 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')

Run the code above in your browser using DataLab