| opiInitialise_for_SimHensonRT {OPI} | R Documentation |
opiInitialise_for_SimHensonRT
Description
Simulates responses using a Frequency of Seeing (FoS) curve.
For internal use only, use opiInitialize().
The FoS is modelled as a cumulative Gaussian function over dB with
standard deviation equal to min(cap, exp( A * t + B)), where
t is the threshold/mean of the FoS in dB.
All values are in dB relative to maxStim.
Arguments
type |
A single character that is:
|
A |
Coefficient of |
B |
Addend of |
cap |
Maximum dB value for the stdev of the FoS curve. |
maxStim |
The maximum stimulus value (0 dB) in cd/ |
rtData |
A data.frame with colnames == "Rt", "Dist", "Person" (or NULL for default). |
rtFP |
A response time for false positives ??? for "SimHensonRT" |
... |
Any other parameters you like, they are ignored. |
Details
If the chosen OPI implementation is SimHensonRT, then the first six
parameters are as in SimHenson, and rtData is a data frame
with at least 2 columns: "Rt", response time; and "Dist",
signifying that distance between assumed threshold and stimulus value in
your units.
This package contains RtSigmaUnits or RtDbUnits that can be
loaded with the commands data(RtSigmaUnits) or data(RtDbUnits),
and are suitable to pass as values for rtData.
rtFp gives the vector of values in milliseconds from which a response
time for a false positive response is randomly sampled.
Value
A list with elements:
-
errNULL if initialised, string msg otherwise
Examples
# Set up a simple simulation for white-on-white perimetry
# and display the stimuli in a plot region and simulate response times
chooseOpi("SimHensonRT")
data(RtSigmaUnits)
oi <- opiInitialize(type="C", cap=6, display=NA, rtData=RtSigmaUnits, rtFP=1:100)
if (!is.null(oi$err))
stop("opiInitialize failed")
# Set up a simple simulation for white-on-white perimetry
chooseOpi("SimHenson")
res <- opiInitialize(type = "C", cap = 6)
if (!is.null(res$err))
stop(paste("opiInitialize() failed:", res$err))