plot.predict_roc {metaSDTreg} | R 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 |
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')
[Package metaSDTreg version 0.2.2 Index]