Title: | Queueing Model of Visual Search |
---|---|
Description: | The queueing model of visual search models the accuracy and response time data in a visual search experiment using queueing models with finite customer population and stopping criteria of completing the service for finite number of customers. It implements the conceptualization of a hybrid model proposed by Moore and Wolfe (2001), in which visual stimuli enter the processing one after the other and then are identified in parallel. This package provides functions that simulate the specified queueing process and calculate the Wasserstein distance between the empirical response times and the model prediction. |
Authors: | Martin Schlather [aut], Yiqi Li [aut, cre]
|
Maintainer: | Yiqi Li <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.2.2 |
Built: | 2025-03-05 03:45:56 UTC |
Source: | https://github.com/cran/qmvs |
WM
calculates a distance between the empirical and simulated
response time on a given number of trials in an experiment using
standard visual search paradigm.
WMdiffresp
takes both correct and incorrect response times into
account.
WMdiffrespweight
takes both correct and incorrect response times
into account and weights the distances of correct and incoreect
response times with the relative frequencies of the data.
WMdiffrespshift
takes both correct and incorrect response times
into account and assumes different non-decision times for no and yes
responses.
WMdiffrespshiftweight
takes both correct and incorrect response
times into account assuming different non-decision times for no and yes
responses and weights the distances with the relative frequencies of
the data.
WM(par, esterrorpar, c, k, pr, N, empRT, old=FALSE) WMdiffresp(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespweight(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespshift(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespshiftweight(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, sep_shift = TRUE, wcorrect = NULL, seed=0)
WM(par, esterrorpar, c, k, pr, N, empRT, old=FALSE) WMdiffresp(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespweight(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespshift(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, seed=0) WMdiffrespshiftweight(par, esterrorpar, c, k, pr, N, empRT, empresp, old=FALSE, sep_shift = TRUE, wcorrect = NULL, seed=0)
par |
A vector of length 3 or 4, equals (miat, mst, Tres) if non-decision time is assumed to be the same for no and yes responses (as in WM, WMdiffresp and WMdiffrespweight) and ( |
esterrorpar |
A vector of length 5. Estimates of the accuracy-related parameters ( |
c |
A natural number representing the number of parallel servers of the system. |
k |
A natural number representing the total number of stimuli in the display (set size). |
pr |
Logical. If pr is |
N |
A natural number representing the number of simulation runs. |
empRT |
A vector of empirical response times collected under given target presence and set size condition. |
empresp |
A vector of empirical responses collected under given target presence and set size condition. |
old |
Logical. If old is |
sep_shift |
Logical. Shall separate shifts be used for positive and negative answers? |
wcorrect |
Logical or |
seed |
The random seed used in the simulation. |
A positive number.
WMdiffresp
returns the sum of the distances associated with
correct and incorrect response times,
WMdiffrespweight
the sum of the weighted distances.
WMdiffrespshift
the sum of the distances associated with
correct and incorrect response times, assuming different non-decision
times for no and yes responses.
WMdiffrespshiftweight
the weighted sum.
Yiq Li, [email protected],https://www.xing.com/profile/Yiqi_Li3, Martin Schlather,[email protected],https://www.wim.uni-mannheim.de/schlather/
Li, Yiqi (2020) Visual search as a queueing process. Doctoral dissertation, University of Mannheim.
simdata1 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 0) simdata2 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 12345) WM(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], old=FALSE) WMdiffresp(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespweight(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespshift(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespshiftweight(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE)
simdata1 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 0) simdata2 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 12345) WM(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], old=FALSE) WMdiffresp(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespweight(par = c(30, 200, 300), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespshift(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE) WMdiffrespshiftweight(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, empRT = simdata2[,1], empresp = simdata2[,2], old=FALSE)
LqDist
calculates the Wasserstein metric or Kolmogorov-Smirnov
distance between two data sets.
LqDist(E1, E2, q=1)
LqDist(E1, E2, q=1)
E1 , E2
|
Vectors of data between which a distance is to calculate. |
q |
Option for the distance measure. If |
A positive number.
Yiq Li, [email protected],https://www.xing.com/profile/Yiqi_Li3, Martin Schlather,[email protected],https://www.wim.uni-mannheim.de/schlather/
Li, Yiqi (2020) Visual search as a queueing process. Doctoral dissertation, University of Mannheim.
simdata1 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 0) simdata2 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 12345) simcorrectRT1 <- subset(simdata1, simdata1[,2] == TRUE, select = 1) simcorrectRT2 <- subset(simdata2, simdata2[,2] == TRUE, select = 1) LqDist(simcorrectRT1, simcorrectRT2, q=1)
simdata1 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 0) simdata2 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 12345) simcorrectRT1 <- subset(simdata1, simdata1[,2] == TRUE, select = 1) simcorrectRT2 <- subset(simdata2, simdata2[,2] == TRUE, select = 1) LqDist(simcorrectRT1, simcorrectRT2, q=1)
queue
simulates the response and response time on a single trial
in an experiment using standard visual search paradigm.
queue(miat, mst, c, pr, L, misidd, misidt, arrival, serving, tposition, old=FALSE)
queue(miat, mst, c, pr, L, misidd, misidt, arrival, serving, tposition, old=FALSE)
miat |
A positive number representing the scale parameter of the exponential distribution of interarrival times, i.e., the mean interarrival time. |
mst |
A positive number representing the scale parameter of the exponential distribution of service times, i.e., the mean service time. |
c |
A natural number representing the number of parallel servers of the system. |
pr |
Logical. If pr is |
L |
A natural number representing the number of stimuli that have been identified to terminate the queueing process. |
misidd |
Logical vector of length k.
Here, |
misidt |
Logical. Here,
|
arrival |
A vector of length set size. Elements must be exponentially distributed random numbers with rate 1. |
serving |
A vector of length set size. Elements must be exponentially distributed random numbers with rate 1. |
tposition |
A natural number representing the position of the target in the queue, in target present case less or equal to set size, in target absent case equal to set size +1. |
old |
Logical. If old is |
A numeric vector of length 5 indicating the number of visual items processed, the mean processing time of a single item, the maximum of processing time of a single item, the system response time and the response.
Yiq Li, [email protected],https://www.xing.com/profile/Yiqi_Li3, Martin Schlather,[email protected],https://www.wim.uni-mannheim.de/schlather/
Li, Yiqi (2020) Visual search as a queueing process. Doctoral dissertation, University of Mannheim.
Moore C. M.,and Wolfe J. M. (2001) Getting beyond the serial/parallel debate in visual search: A hybrid approach. In Shapiro, K.L. The Limits of Attention: Temporal Constraints on Human Information Processing. Oxford University Press doi:10.1093/acprof:oso/9780198505150.003.0009
queue(miat = 30, mst = 200, c = 4, pr = TRUE, L = 12, misidd = rep(0L, 12), misidt = 0, arrival = rexp(12), serving = rexp(12), tposition = 7, old=FALSE)
queue(miat = 30, mst = 200, c = 4, pr = TRUE, L = 12, misidd = rep(0L, 12), misidt = 0, arrival = rexp(12), serving = rexp(12), tposition = 7, old=FALSE)
sim.ny
simulates a data set containing the responses and
response times on either target present or target absent trials under
specified set size level in an experiment using standard visual search
paradigm, whereby the non-decision time for yes and no options are
represented by two different parameters.
sim.ny(par, esterrorpar, c, k, pr, N, empRT, seed=0)
sim.ny(par, esterrorpar, c, k, pr, N, empRT, seed=0)
par |
A vector of length 3 or 4, equals (miat, mst, Tres) if non-decision time is assumed to be the same for no and yes responses (as in WM, WMdiffresp and WMdiffrespweight) and ( |
esterrorpar |
A vector of length 5. Estimates of the accuracy-related parameters ( |
c |
A natural number representing the number of parallel servers of the system. |
k |
A natural number representing the total number of stimuli in the display (set size). |
pr |
Logical. If pr is |
N |
A natural number representing the number of simulation runs. |
empRT |
A vector of empirical response times collected under given target presence and set size condition. |
seed |
The random seed used in the simulation. |
A matrix. The first column contains the simulated response times
and the second colum the corresponding simulated responses.
Yiq Li, [email protected],https://www.xing.com/profile/Yiqi_Li3, Martin Schlather,[email protected],https://www.wim.uni-mannheim.de/schlather/
Li, Yiqi (2020) Visual search as a queueing process. Doctoral dissertation, University of Mannheim.
sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, seed = 0)
sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094, 0.0299, 0.0020, 1.13), c = 4, k = 12, pr = TRUE, N = 10000, seed = 0)