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:

  • N for using the A and B values from the Normals in Henson et al (2000)

  • G for using the A and B values from the Glaucomas in Henson et al (2000)

  • C for using the A and B values from the Combined in Henson et al (2000)

  • X to specify your own A and B values as parameters

A

Coefficient of t in the formula (ignored if type != 'X').

B

Addend of t in the formula (ignored if type != 'X').

cap

Maximum dB value for the stdev of the FoS curve.

maxStim

The maximum stimulus value (0 dB) in cd/\mbox{m}^2.

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:

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


[Package OPI version 3.0.2 Index]