diffIRT(rt, x, model="D", constrain=NULL,
start=NULL, se=F, control=list())
N
by nit
containing the response times, where N
is the number of subjects and
nit
is the number of items. NA's are allowed. If a given element in rt is NA, the corresponding elementN
by nit
containing the responses. A's are allowed. If a given element in rt
is NA, the corresponding
element in x
is also treated as missing and vice versa.NULL
, the unconstrained model is fitted. Otherwise, one could use a manual setup or a preprogrammed setup. In the manual setup
a vector of length 3*nit+2
should be provided. Each element of this vector corresponds to a paNULL
the starting values are automatically chosen, see Details. Otherwise, a vector of length 3 x nit + 2
should be
provided. Each element of this vector corresponds to a parameter from the model, similarly as in tF
).diffIRT
with valuesse
equals T
, it contains the standard errors
of the parametersN
containing the individual contribution of each subject to the marginal likelihood of the model.control
. Final
4 columns contain LL
(-2 times the log-marginal likelihood at convergence), converg
(the convergence status returned by optim,
func
(the number of likelihood evaluations by optim
), and gradient
(the number of gradient evaluations by optim
).diffIRT
fits either the D-diffusion or the Q-diffusion IRT model to data by
minimizing -2 times the log marginal likelihood function using optim
.
In the diffusion IRT model the traditional parameters from the diffusion model,
boundary separation and drift rate are decomposed into person and item parameters
(see van der Maas et al., 2011; Tuerlinckx & De Boeck, 2005).
This results in: item boundary parameter $a[i]$, item drift parameter $v[i]$,
person boundary $gamma[p]$, and person drift $theta[p]$. The model
for the responses in the D-diffusion IRT model is then: $$logit(x[p,i]) = gamma[p]/a[i] x (theta[i]-v[i]),$$
where $gamma[p] >= 0$ and $ai[i] >= 0$. The Q-diffusion IRT model for the
responses is given by: $$logit(x[p,i]) = gamma[p]/a[i] x (theta[p]/v[i]).$$
where $gamma[p] >= 0$, $a[i] >= 0$, $theta[p] >= 0$, and $theta[p] >= 0$.
As discussed in van der Maas et al. (2011), this setup makes the D-diffusion IRT model
suitable for personality data and the Q-diffusion IRT model for ability data.
The response times follow a distribution according to a Wiener process which includes
- in addition to the parameters above - a non-decision parameter for each
item, $Ter[i]$. For the random effects, $theta[p]$ and $gamma[p]$ scale parameters are estimated
which are respectively, $omega[gamma]$ and $omega[theta]$. The joint distribution of
responses and response times is evaluated using the approach
by Navarro & Fuss (2009). In this approach, the infinite sum in the density function
of the diffusion model is being approximated with a maximum discrepancy of epsilon
. This discrepancy can be
set using the eps
setting within the control
argument. To facilitated numerical estimation, the natural logarithm
of the parameters that are strictly positive are estimated (i.e., log(a[i])
, log(Ter[i])
,
log(omega[gamma])
, log(omega[theta])
, and log(v[i])
in the Q-diffusion model). However, in the output
the parameters are transformed back to their original scale. In addition, if se=T
,
standard errors for the original parameters are calculated from the standard errors
of the transformed parameters using the delta method.
Because gamma[p] and theta[p] in the Q-diffusion model and gamma[p] in the D-diffusion model can
only be positive, their population distribution is assumed to be normal on the log-scale.
As a consequence, gamma[p] and theta[p] follow a log-normal distribution. Thus, in the Q-diffusion model gamma[p]
and theta[p]
are
log-normally distributed with scale parameters omega[gamma]
and omega[theta]
respectively. In case of the
D-diffusion model, theta[p]
is distributed log-normally with scale parameter omega[gamma]
, and theta[p]
is distributed normally with scale parameter omega[theta]
which equals the standard deviation.
By default, starting values are calculated using the EZ-diffusion model (Wagemakers, van der Maas, & Grasman, 2007).
For more details see Molenaar, Tuerlinkcx, & van der Maas (2013).Navarro, D.J. & Fuss, I.G. (2009). Fast and accurate calculations for first-passagetimes in Wiener diffusion models. Journal of Mathematical Psychology, 53, 222-230.
Tuerlinckx, F., & De Boeck, P. (2005). Two interpretations of the discrimination parameter. Psychometrika, 70, 629-650.
van der Maas, H.L.J., Molenaar, D., Maris, G., Kievit, R.A., & Borsboom, D. (2011). Cognitive psychology meets psychometric theory: On the relation between process models for decision making and latent variable models for individual differences. Psychological Review, 118, 339-356.
Wagenmakers, E. J., Van Der Maas, H. L., & Grasman, R. P. (2007). An EZ-diffusion model for response time and accuracy. Psychonomic Bulletin & Review, 14, 3-22.
simdiff
for simulating data according to the D-diffusion or Q-diffusion IRT model.
factest
for estimation of factor scores (person drift rate and person boundary separation).
QQdiff
and RespFit for model fit assessment.
summary.diffIRT
for a overview of the model estimation results, including model fit statistics.
anova.diffIRT
to conduct a likelihood ratio test between two nested diffIRT models.
coef.diffIRT
to extract parameter estimates.# open extraversion data
data(extraversion)
x=extraversion[,1:10]
rt=extraversion[,11:20]
# fit an unconstrained D-diffusion model
res1=diffIRT(rt,x,model="D")
# fit a model with equal item boundaries, a[i] using the manual setup
res2=diffIRT(rt,x,model="D",
constrain=c(rep(1,10),2:11,12:21,22,23))
# fit a model with equal item boundaries, a[i] using the preprogrammed setup
res2=diffIRT(rt,x,model="D",
constrain="ai.equal")
# fit a model where all item drift parameters,vi, are fixed to 0.
res3=diffIRT(rt,x,model="D",
constrain=c(1:10,rep(0,10),11:20,21,22),
start=c(rep(NA,10),rep(0,10),rep(NA,10),NA,NA))
# fit a model without random person boundary parameters.
res3=diffIRT(rt,x,model="D",
constrain=c(1:30,0,31),
start=c(rep(NA,30),0,NA))
Run the code above in your browser using DataLab