Description Usage Arguments Details Value References See Also Examples
Fit finite mixtures of multinomial processing tree (MPT) models via maximum likelihood with the EM algorithm.
1 2 3 4 5 6 7 8  mptmix(formula, data, k, subset, weights,
nrep = 3, cluster = NULL, control = NULL,
verbose = TRUE, drop = TRUE, unique = FALSE, which = NULL,
spec, treeid = NULL,
optimargs = list(control = list(reltol =
.Machine$double.eps^(1/1.2), maxit = 1000)), ...)
FLXMCmpt(formula = . ~ ., spec = NULL, treeid = NULL, optimargs = NULL, ...)

formula 
Symbolic description of the model (of type 
data, subset 
Arguments controlling formula processing. 
k 
A vector of integers indicating the number of components of
the finite mixture; passed in turn to the 
weights 
An optional vector of weights to be used in the fitting
process; passed in turn to the 
nrep 
Number of runs of the EM algorithm. 
cluster 
Either a matrix with 
control 
An object of class 
verbose 
A logical; if 
drop 
A logical; if 
unique 
A logical; if 
which 
number of model to get if 
spec, treeid, optimargs 
arguments for the MPT model passed on to

... 
Currently not used. 
Internally stepFlexmix
is called with suitable arguments to fit the finite mixture model with
the EM algorithm.
FLXMCmpt
is the flexmix
driver for
MPT mixture models.
The interface is designed along the same lines as raschmix
which is introduced in detail in Frick et al. (2012). However, the
mptmix
function has not yet been fully tested and may change in
future versions.
The latentclass MPT model (Klauer, 2006) is equivalent to an MPT mixture model without concomitant variables.
MPT models are specified using the mptspec
function. See the
documentation in the mpt package for details.
Either an object of class "mptmix"
containing the best model
with respect to the loglikelihood (if k
is a scalar) or the
one selected according to which
(if specified and k
is a
vector of integers longer than 1) or an object of class
"stepMPTmix"
(if which
is not specified and k
is a
vector of integers longer than 1).
Frick, H., Strobl, C., Leisch, F., and Zeileis, A. (2012). Flexible Rasch Mixture Models with Package psychomix. Journal of Statistical Software, 48(7), 1–25. http://www.jstatsoft.org/v48/i07/
Klauer, K.C. (2006). Hierarchical Multinomial Processing Tree Models: A LatentClass Approach. Psychometrika, 71, 7–31. doi: 10.1007/s1133600411883
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  ## Data
data("PairClustering", package = "psychotools")
pc < reshape(PairClustering, timevar = "trial", idvar = "ID",
direction = "wide")
## Latentclass MPT model (Klauer, 2006)
suppressWarnings(RNGversion("3.5.0"))
set.seed(1)
m < mptmix(as.matrix(pc[1]) ~ 1, data = pc, k = 1:3,
spec = mptspec("SR", .replicates = 2))
m1 < getModel(m, which = "BIC")
## Inspect results
summary(m1)
parameters(m1)
plot(m1)
library(lattice)
xyplot(m1)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.