opiPresent_for_SimGaussian {OPI} | R Documentation |
opiPresent_for_SimGaussian
Description
Determine the response to a stimuli by sampling from a cumulative Gaussian Frequency-of-Seeing (FoS) curve (also known as the psychometric function).
The FoS has formula
\mbox{fpr}+(1-\mbox{fpr}-\mbox{fnr})(1-\mbox{pnorm}(x, \mbox{tt}, \mbox{sd})
where x
is the stimulus value in dB, and sd
is
set by opiInitialize
and tt
, fpr
and fnr
are parameters.
This is for internal use only, use opiPresent()
.
Arguments
stim |
A list that contains at least:
|
fpr |
false positive rate for the FoS curve (range 0..1). |
fnr |
false negative rate for the FoS curve (range 0..1). |
tt |
mean of the assumed FoS curve in dB. |
... |
Any other parameters you like, they are ignored. |
Value
A list with elements:
-
err
NULL
if no error, a string message otherwise. -
seen
TRUE
orFALSE
. -
time
AlwaysNA
.
Examples
# Stimulus is Size III white-on-white as in the HFA
chooseOpi("SimGaussian")
res <- opiInitialize(sd = 1.6)
if (!is.null(res$err))
stop(paste("opiInitialize() failed:", res$err))
result <- opiPresent(stim = list(level = dbTocd(20)), tt = 30, fpr = 0.15, fnr = 0.01)
print(paste("Seen:", result$seen, quote = FALSE))
res <- opiClose()
if (!is.null(res$err))
warning(paste("opiClose() failed:", res$err))