predict_roc.metaSDTreg: Predicted ROC curve

View source: R/predict_roc.r

predict_roc.metaSDTregR Documentation

Predicted ROC curve

Description

Predict ROC curves from metaSDTreg object.

Usage

## S3 method for class 'metaSDTreg'
predict_roc(object, type = c("1", "n", "s"), s0 = 0, s1 = 1, ...)

Arguments

object

An object of class metaSDTreg.

type

The type of ROC curve to predict. A character string, where '1' requests the type 1 ROC curve (the default), 'n' requests the type 2 noise-specific and 's' the type 2 signal-specific ROC curve.

s0

Numeric, the value of 'signal' to regard as 'noise'. Defaults to 0.

s1

Numeric, the value of 'signal' to regard as 'signal'. Defaults to 1.

...

For future methods

Details

The 'metaSDTreg' object given to the function must have named coefficients with names as they would be if metaSDTreg is run without user-supplied starting values.

A ROC curve is a 2-D curve parametrised by some x given by c(FA(x), HR(x)) where FA is the false alarm rate and HR is the hit rate. For example, for type 1 ROC,

FA(x) = 1 - pnorm(x - s0*d),

HR(x) = 1 - pnorm(x - s1*d),

where d is the signal sensitivity.

Note that the predicted ROC curve is for a reference individual in the regression, i.e. additional covariates are not entered into the ROC so that reparametrisation of the 'metaSDTreg' model is needed to change predictions.

Value

A function of class 'predict_roc' containing the appropriate ROC curve. This is a function of x which returns c(FA,HR), where FA is the false alarm rate and HR is the hit rate.

References

Maniscalco, B., & Lau, H. (2014). Signal Detection Theory Analysis of Type 1 and Type 2 Data: Meta-d , Response-Specific Meta-d , and the Unequal Variance SDT Model. In S. M. Fleming, & C. D. Frith (Eds.), The Cognitive Neuroscience of Metacognition (pp. 25 66). : Springer Berlin Heidelberg.

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')


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