opiPresent_for_SimHenson | R Documentation |
Determine the response to a stimuli by sampling from a cumulative Gaussian Frequency-of-Seeing (FoS) curve (also known as the psychometric function).
For internal use only, use opiPresent()
.
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. |
The FoS formula is
\mbox{fpr}+(1-\mbox{fpr}-\mbox{fnr})(1-\mbox{pnorm}(x, \mbox{tt}, \mbox{pxVar})
where x
is the stimulus value in dB, and pxVar
is
\min(\mbox{cap}, e^{A\times\mbox{tt}+B}).
The ceiling cap
is set with the call to
opiInitialize
, and A
and B
are from Table 1 in Henson
et al (2000), also set in the call to opiInitialise
using the type
parameter.
A list with elements:
err
NULL
if no error, a string message otherwise.
seen
TRUE
or FALSE
.
time
Always NA
.
# Stimulus is Size III white-on-white as in the HFA
chooseOpi("SimHenson")
res <- opiInitialize(type = "C", cap = 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))
stop(paste("opiClose() failed:", res$err))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.