lines.predict_roc: Lines of predicted ROC curve

View source: R/predict_roc.r

lines.predict_rocR Documentation

Lines of predicted ROC curve

Description

Plot lines method for objects of class 'predict_roc'.

Usage

## S3 method for class 'predict_roc'
lines(x, thr = seq(-10, 10, length = 1000), ...)

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.

...

Addtional arguments passed to lines.

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)

## Plot observed type 1 ROC points
plot(predict_roc(metadata, type = '1'), xlim = 0:1, ylim = 0:1)

## Add Model-predicted ROC curve (estimated from subset of data)
lines(predict_roc(fit, type = '1'))


metaSDTreg documentation built on March 31, 2023, 10:09 p.m.