Learn R Programming

ream (version 1.0-5)

CDSTP: Continuous Dual-Stage Two-Phase Model of Selective Attention

Description

A continuous approximation of the Dual-Stage Two-Phase model of conflict tasks. The Dual-Stage Two-Phase model assumes that choice in conflict tasks involves two processes: a decision process and a target selection process. The target selection process is an SDDM, while the decision process is an SDDM but with drift rate $$v(x,t) = (1 - w(t))*(\mu_t + c*\mu_{nt}) + w(t)*\mu_2,$$ where \(w(t) = 0\) before target selection and \(w(t) = 1\) after target selection. A full derivation of this model is in the ream publication.

Usage

dCDSTP(rt, resp, phi, x_res = "default", t_res = "default")

pCDSTP(rt, resp, phi, x_res = "default", t_res = "default")

rCDSTP(n, phi, dt = 1e-05)

Value

For the density a list of PDF values, log-PDF values, and the sum of the log-PDFs, for the distribution function a list of of CDF values, log-CDF values, and the sum of the log-CDFs, and for the random sampler a list of response times (rt) and response thresholds (resp).

Arguments

rt

vector of response times

resp

vector of responses ("upper" and "lower")

phi

parameter vector in the following order:

  1. Non-decision time (\(t_{nd}\)). Time for non-decision processes such as stimulus encoding and response execution. Total decision time t is the sum of the decision and non-decision times.

  2. Relative start (\(w\)). Sets the start point of accumulation as a ratio of the two decision thresholds. Related to the absolute start z point via equation \(z = b_l + w*(b_u - b_l)\).

  3. Relative start of the target selection process (\(w_{ts}\)). Sets the start point of accumulation for the target selection process as a ratio of the two decision thresholds. Related to the absolute start \(z_{ts}\) point via equation \(z_{ts} = b_{lts} + w_ts*(b_{uts} – b_{lts})\).

  4. Target stimulus strength (\(\mu_t\)).

  5. Congruence parameter (\(c\)). Set experiment congruency. In congruent condition \(c = 1\), in incongruent condition \(c = -1\), and in neutral condition \(c = 0\).

  6. Non-target stimulus strength (\(\mu_{nt}\)).

  7. Drift rate following target selection i.e. stage 2 (\(\mu_2\)).

  8. Target selection drift rate (\(\mu_{ts}\)).

  9. Noise scale (\(\sigma\)). Model scaling parameter.

  10. Effective noise scale of continuous approximation (\(\sigma_{eff}\)). See ream publication for full description.

  11. Decision thresholds (\(b\)). Sets the location of each decision threshold. The upper threshold \(b_u\) is above 0 and the lower threshold \(b_l\) is below 0 such that \(b_u = -b_l = b\). The threshold separation \(a = 2b\).

  12. Target selection decision thresholds (\(b_{ts}\)). Sets the location of each decision threshold for the target selection process. The upper threshold \(b_{uts}\) is above 0 and the lower threshold \(b_{lts}\) is below 0 such that \(b_{uts} = -b_{lts} = b_{ts}\). The threshold separation \(a_{ts} = 2b_{ts}\).

  13. Contamination (\(g\)). Sets the strength of the contamination process. Contamination process is a uniform distribution \(f_c(t)\) where \(f_c(t) = 1/(g_u-g_l)\) if \(g_l <= t <= g_u\) and \(f_c(t) = 0\) if \(t < g_l\) or \(t > g_u\). It is combined with PDF \(f_i(t)\) to give the final combined distribution \(f_{i,c}(t) = g*f_c(t) + (1-g)*f_i(t)\), which is then output by the program. If \(g = 0\), it just outputs \(f_i(t)\).

  14. Lower bound of contamination distribution (\(g_l\)). See parameter \(g\).

  15. Upper bound of contamination distribution (\(g_u\)). See parameter \(g\).

x_res

spatial/evidence resolution

t_res

time resolution

n

number of samples

dt

step size of time. We recommend 0.00001 (1e-5)

Author

Raphael Hartmann & Matthew Murrow

References

Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological review, 117(3), 759.

Examples

Run this code
# Probability density function
dCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"),
       phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0))

# Cumulative distribution function
pCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"),
       phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0))

# Random sampling
rCDSTP(n = 100, phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3,
                        0.0, 0.0, 1.0), dt = 0.001)

Run the code above in your browser using DataLab