simdiff {diffIRT} | R Documentation |
Simulate data according to the D-diffusion or Q-diffusion IRT model.
Description
This function simulates responses and response time data according to the D-diffusion or Q-diffusion IRT model.
Usage
simdiff(N,nit,ai=NULL,vi=NULL,gamma=NULL,theta=NULL,ter=NULL,
model="D",max.iter=19999,eps=1e-15)
Arguments
N |
number of subjects. |
nit |
number of items. |
ai |
a vector of length |
vi |
a vector of length |
gamma |
a vector of length |
theta |
a vector of length |
ter |
a vector of length |
model |
string; Either "D" to fit the D-diffusion IRT model or "Q" to fit the Q-diffusion IRT model. |
max.iter |
maximum number of iterations for the rejection algorithm. See Details. |
eps |
convergence criterion for the rejection algorithm. See Details |
Details
Function simdiff
is an extension of the rejection algorithm outlined in Tuerlinckx et al. (2001). In this algorithm,
a proposal response time is sampled from an exponential distribution. This proposal is accepted as actual response
time when a specific condition is satisfied (see Eq. 16 in Tuerlinckx, 2001). As this condition requires the
approximation of an infinite sum, a convergence criterion needs to be specified (see the argument eps
). When
the condition is not satisfied, a new proposal response time is sampled. This is repeated until the proposal response
time is accepted or when max.iter
has been reached.
Value
Returns a list with the following entries:
rt |
the simulated matrix of response times |
x |
the simulated matrix of responses |
ai |
true values for |
vi |
true values for |
gamma |
true values for |
theta |
true values for |
ter |
true values for |
Author(s)
Dylan Molenaar d.molenaar@uva.nl
References
Tuerlinckx, F., Maris, E., Ratcliff, R., & De Boeck, P. (2001). A comparison of four methods for simulating the diffusion process. Behavior Research Methods, Instruments & Computers, 33, 443-456.
See Also
diffIRT
for fitting diffusion IRT models.
Examples
## Not run:
# simulate data accroding to D-diffusion model
data=simdiff(N=100,nit=10,model="D")
## End(Not run)