Learn R Programming

mpt (version 0.3-0)

mpt: Multinomial Processing Tree (MPT) Models

Description

Fits a (joint) multinomial processing tree model using the EM algorithm.

Usage

mpt(formula, data, treeid = "treeid", constr = NULL,
  start = rep(0.5, length(all.vars(formula[[3]]))), ...)

## S3 method for class 'mpt': summary(object, \dots)

## S3 method for class 'mpt': anova(object, \dots, test = c("Chisq", "none"))

Arguments

formula
an object of class formula: a symbolic description of the model to be fitted. (See Details and Examples.)
data
a data frame consisting at least of one variable that contains the absolute response frequencies.
treeid
name of the variable that identifies the processing trees of a joint multinomial model.
constr
a named list of character vectors consisting of parameter names. The parameters in each vector are constrained to be equal.
start
a vector of starting values for the parameter estimates.
...
additional arguments passed to mptEM.
object
an object of class mpt, typically the result of a call to mpt.
test
should the p-values of the chi-square distributions be reported?

Value

  • coefficientsa vector of parameter estimates.
  • fitted.valuesthe fitted response frequencies.
  • loglikthe log-likelihood of the fitted model.
  • astructural constants passed to mptEM.
  • bstructural constants passed to mptEM.
  • cstructural constants passed to mptEM.
  • goodness.of.fitthe goodness of fit statistic including the likelihood ratio fitted vs. saturated model (G2), the degrees of freedom, and the p-value of the corresponding chi-square distribution.
  • iterthe number of iterations of the EM algorithm.
  • pcatthe predicted probabilities for each response category.
  • pbranchthe predicted probabilities for each branch in the tree.
  • formulathe model formula.
  • ntreesthe number of trees in a joint multinomial model.
  • nthe total number of observations per tree.
  • ythe vector of response frequencies.

Details

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 tree-like 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.

Each row in data corresponds to one response category. The model formula symbolically describes the model, for example it could look like var ~ list(x + (1 - x)*y, (1 - x)*(1 - y), y, 1 - y, ...) where the left hand side is the variable that contains the response frequencies. The right hand side gives the model parameters in a list. Each component of the list represents the probability of a response in the corresponding category (link probabilities are multiplied, branch probabilities are added). Thus, the list usually has as many components as rows in the data frame.

Joint (or product) multinomial models consist of more than one processing tree. The treeid should uniquely identify each tree. The model formula does not distinguish between joint and simple models: All model equations should go into a single list. Parameter estimation is carried out by mptEM which implements the EM algorithm.

References

Batchelder, W.H. & Riefer, D.M. (1999). Theoretical and empirical review of multinomial process tree modeling. Psychonomic Bulletin & Review, 6, 57--86.

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, 108--124.

Riefer, D.M., & Batchelder, W.H. (1988). Multinomial modeling and the measurement of cognitive processes. Psychological Review, 95, 318--339.

See Also

mptEM, retroact, proact, plot.mpt, residuals.mpt, logLik.mpt.

Examples

Run this code
## Storage-retrieval model for pair clustering (Riefer & Batchelder, 1988)
data(retroact)

mpt1 <- mpt(freq ~ list(
  c*r,
  (1 - c)*u^2,
  2*(1 - c)*u*(1- u),
  c*(1 - r) + (1 - c)*(1 - u)^2,
  u,
  1 - u
), retroact[retroact$lists == 0,])

summary(mpt1)  # parameter estimates, goodness of fit
plot(mpt1)     # residuals versus predicted values
confint(mpt1)  # approximate confidence intervals

plot(mpt1$coef, axes=FALSE, ylim=0:1, pch=16, xlab="",
  ylab="Parameter estimate (MPT model, 95% CI)")
axis(1, 1:3, names(mpt1$coef)); axis(2)
arrows(1:3, confint(mpt1)[,1], 1:3, confint(mpt1)[,2], .05, 90, 3)

## See ?retroact and ?proact for further examples.

Run the code above in your browser using DataLab