mpt  R Documentation 
Fits a (joint) multinomial processing tree (MPT) model specified
by a symbolic description via mptspec
.
mpt(spec, data, start = NULL, method = c("BFGS", "EM"), treeid = "treeid", freqvar = "freq", optimargs = if(method == "BFGS") list(control = list(reltol = .Machine$double.eps^(1/1.2), maxit = 1000)) else list()) ## S3 method for class 'mpt' anova(object, ..., test = c("Chisq", "none")) ## S3 method for class 'mpt' coef(object, logit = FALSE, ...) ## S3 method for class 'mpt' confint(object, parm, level = 0.95, logit = TRUE, ...) ## S3 method for class 'mpt' predict(object, newdata = NULL, type = c("freq", "prob"), ...) ## S3 method for class 'mpt' summary(object, ...)
spec 
an object of class 
data 
a data frame consisting at least of one variable that contains the absolute response frequencies. Alternatively, a (named) vector or matrix of frequencies. 
start 
a vector of starting values for the parameter estimates between zero and one. 
method 
optimization method. Implemented are

treeid 
name of the variable that identifies the processing trees of a joint multinomial model. Alternatively, a factor that identifies each tree. 
freqvar 
if 
logit 
logical. Parameter estimates on logit or probability scale. 
optimargs 
a list of arguments passed to the optimization function,
either 
object 
an object of class 
test 
should the pvalues of the chisquare distributions be reported? 
parm, level 
See 
newdata 
a vector of response frequencies. 
type 
predicted frequencies or probabilities. 
... 
additional arguments passed to other methods. 
Multinomial processing tree models (Batchelder & Riefer, 1999; Erdfelder et al., 2009; Riefer & Batchelder, 1988) seek to represent the categorical responses of a group of subjects by a small number of latent (psychological) parameters. These models have a treelike graph, the links being the parameters, the leaves being the response categories. The path from the root to one of the leaves represents the cognitive processing steps executed to arrive at a given response.
If data
is a data frame, each row corresponds to one response
category. If data
is a vector or matrix, each element or column
corresponds to one response category. The order of response categories and
of model equations specified in mptspec
should match.
Joint (or product) multinomial models consist of more than one processing
tree. The treeid
should uniquely identify each tree.
Per default, parameter estimation is carried out by optim
's
BFGS method on the logit scale with analytical gradients; it can be switched
to mptEM
which implements the EM algorithm.
An object of class mpt
containing the following components:
coefficients 
a vector of parameter estimates. For extraction, the

loglik 
the loglikelihood of the fitted model. 
nobs 
the number of nonredundant response categories. 
fitted 
the fitted response frequencies. 
goodness.of.fit 
the goodness of fit statistic including the likelihood ratio fitted vs. saturated model (G2), the degrees of freedom, and the pvalue of the corresponding chisquare distribution. 
ntrees 
the number of trees in a joint multinomial model. 
n 
the total number of observations per tree. 
y 
the vector of response frequencies. 
pcat 
the predicted probabilities for each response category. 
treeid 
a factor that identifies each tree. 
a, b, c 
structural constants passed to 
spec 
the MPT model specification returned by 
method 
the optimization method used. 
optim 
the return value of the optimization function. 
Batchelder, W.H., & Riefer, D.M. (1999). Theoretical and empirical review of multinomial process tree modeling. Psychonomic Bulletin & Review, 6(1), 57–86. doi: 10.3758/bf03210812
Erdfelder, E., Auer, T., Hilbig, B.E., Assfalg, A., Moshagen, M., & Nadarevic, L. (2009). Multinomial processing tree models: A review of the literature. Zeitschrift fuer Psychologie, 217(3), 108–124. doi: 10.1027/00443409.217.3.108
Riefer, D.M., & Batchelder, W.H. (1988). Multinomial modeling and the measurement of cognitive processes. Psychological Review, 95(3), 318–339. doi: 10.1037/0033295x.95.3.318
mptEM
, mptspec
, simulate.mpt
,
plot.mpt
, residuals.mpt
,
logLik.mpt
, vcov.mpt
, optim
.
## Storageretrieval model for pair clustering (Riefer & Batchelder, 1988) data(retroact) spec < mptspec( c*r, (1  c)*u^2, 2*(1  c)*u*(1  u), c*(1  r) + (1  c)*(1  u)^2, u, 1  u ) m < mpt(spec, retroact[retroact$lists == 0, ]) summary(m) # parameter estimates, goodness of fit plot(m) # residuals versus predicted values confint(m) # approximate confidence intervals plot(coef(m), axes = FALSE, ylim = 0:1, pch = 16, xlab = "", ylab="Parameter estimate (MPT model, 95% CI)") axis(1, 1:3, names(coef(m))); axis(2) arrows(1:3, plogis(confint(m))[, 1], 1:3, plogis(confint(m))[, 2], .05, 90, 3) ## See data(package = "mpt") for application examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.