MPT Trees

Description

Recursive partitioning (also known as trees) based on multinomial processing tree (MPT) models.

Usage

mpttree(formula, data, na.action, cluster, spec, treeid = NULL,
  optimargs = list(control = list(reltol = .Machine\$double.eps^(1/1.2),
                                  maxit = 1000)), ...)

Arguments

formula a symbolic description of the model to be fit. This should be of type y ~ x1 + x2 where y should be a matrix of response frequencies and x1 and x2 are used as partitioning variables.
data an optional data frame containing the variables in the model.
na.action a function which indicates what should happen when the data contain NAs, defaulting to na.pass.
cluster optional vector (typically numeric or factor) with a cluster ID to be employed for clustered covariances in the parameter stability tests.
spec, treeid, optimargs arguments for the MPT model passed on to mptmodel.
arguments passed to mob_control.

Details

MPT trees (Wickelmaier & Zeileis, 2018) are an application of model-based recursive partitioning (implemented in mob) to MPT models (implemented in mptmodel). See Wickelmaier & Zeileis (2018) for a detailed discussion. For technical and algorithmic details, see the documentation of the two core functions linked above as well as vignette(“mob”, package = “partykit”).

Various methods are provided for “mpttree” objects, most of them inherit their behavior from “mob” objects (e.g., print, summary, etc.). The plot method employs the node_mptplot panel-generating function.

Value

An object of S3 class “mpttree” inheriting from class “modelparty”.

References

Wickelmaier F, Zeileis A (2018). Using Recursive Partitioning to Account for Parameter Heterogeneity in Multinomial Processing Tree Models. Behavior Research Methods, 50(3), 1217–1233. doi:10.3758/s13428-017-0937-z

See Also

mob, mptmodel.

Examples

library("psychotree")

o <- options(digits = 4)

## Source Monitoring data
data("SourceMonitoring", package = "psychotools")

## MPT tree
sm_tree <- mpttree(y ~ sources + gender + age, data = SourceMonitoring,
  spec = mptspec("SourceMon", .restr = list(d1 = d, d2 = d)))
plot(sm_tree, index = c("D1", "D2", "d", "b", "g"))

## extract parameter estimates
coef(sm_tree)
      D1      d      g      b     D2
3 0.6245 0.4417 0.6285 0.1178 0.7420
4 0.5373 0.2643 0.5144 0.2045 0.7179
5 0.6349 0.4456 0.4696 0.1948 0.6120
## parameter instability tests in root node
if(require("strucchange")) sctest(sm_tree, node = 1)
            sources gender     age
statistic 2.848e+01 9.0034 16.9298
p.value   8.805e-05 0.2925  0.2489
## storage and retrieval deficits in psychiatric patients
data("MemoryDeficits", package = "psychotools")
MemoryDeficits$trial <- ordered(MemoryDeficits$trial)

## MPT tree
sr_tree <- mpttree(cbind(E1, E2, E3, E4) ~ trial + group,
  data = MemoryDeficits, cluster = ID, spec = mptspec("SR2"), alpha = 0.1)

## extract parameter estimates
coef(sr_tree)
       c      r      u
3 0.4611 0.4730 0.4239
4 0.4508 0.2438 0.3248
7 0.3738 0.2733 0.3090
8 0.4342 0.5557 0.4534
9 0.5978 0.8345 0.5842
options(digits = o$digits)