Applies the EM algorithm to fit a multinomial processing tree model.
mptEM(theta, data, a, b, c, maxit = 1000, tolerance = 1e-8,
stepsize = 1, verbose = FALSE)
a vector of starting values for the parameter estimates.
a vector of absolute response frequencies.
a three-dimensional array representing the model structure.
a three-dimensional array representing the model structure.
a matrix of structural constants.
the maximum number of iterations.
the convergence criterion; the iterations converge when \(logLik - logLik.old < tolerance\).
the step size defaulting to 1; slightly larger values may speed up convergence, but may also give errors; use with care.
logical indicating if output should be produced for each iteration.
the vector of parameter estimates.
the log-likelihood at termination of the algorithm.
a vector of predicted probabilities for each response category.
a vector of predicted branch probabilities.
the number of iterations of the algorithm.
Usually, mptEM
is automatically called by mpt
.
A prerequisite for the application of the EM algorithm is that the probabilities of the i-th branch leading to the j-th category take the form $$p_{ij}(\Theta) = c_{ij} \prod_{s = 1}^S \vartheta_s^{a_{ijs}} (1 - \vartheta_s)^{b_{ijs}},$$ where \(\Theta = (\vartheta_s)\) is the parameter vector, \(a_{ijs}\) and \(b_{ijs}\) count the occurrences of \(\vartheta_s\) and \(1 - \vartheta_s\) in a branch, respectively, and \(c_{kj}\) is a nonnegative real number. The branch probabilities sum up to the total probability of a given category, \(p_j = p_{1j} + \dots + p_{Ij}\). This is the structural restriction of the class of MPT models that can be represented by binary trees. Other model types have to be suitably reparameterized for the algorithm to apply.
See Hu and Batchelder (1994) and Hu (1999) for details on the algorithm.
Hu, X. (1999). Multinomial processing tree models: An implementation. Behavior Research Methods, Instruments, & Computers, 31, 689--695. 10.3758/BF03200747
Hu, X., & Batchelder, W.H. (1994). The statistical analysis of general processing tree models with the EM algorithm. Psychometrika, 59, 21--47. 10.1007/bf02294263
mpt
.
# NOT RUN {
## Fit storage-retrieval model to data in Riefer et al. (2002)
spec <- mptspec("SR2")
mpt1 <- mpt(spec, c(243, 64, 58, 55), method = "EM")
# }
Run the code above in your browser using DataLab