bttree {psychotree}R Documentation

Bradley-Terry Tree Models

Description

Recursive partitioning based on Bradley-Terry models.

Usage

bttree(formula, data, na.action = na.pass,
  type = "loglin", ref = NULL, undecided = NULL, position = NULL,
  minsplit = 10, ...)

Arguments

formula A symbolic description of the model to be fit. This should be of type y ~ x1 + x2 where y should be an object of class paircomp 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.
type, ref, undecided, position arguments for the Bradley-Terry model passed on to btReg.
minsplit, ... arguments passed to mob_control.

Details

Bradley-Terry tree models are an application of model-based recursive partitioning (implemented in mob) to Bradley-Terry models for paired comparison data (implemented in btReg). For all details about the underlying theory and further explanations of the illustrations from the example section can be found in Strobl, Wickelmaier, Zeileis (2010).

Various methods are provided for "bttree" objects, most of them inherit their behavior from "mob" objects (e.g., print, summary, etc.). worth behaves analogously to coef and extracts the worth parameters from the BT models in the nodes of the tree. The plot method employs the node_btplot panel-generating function.

Value

An object of S3 class "bttree" which is a list containing only a single element of S4 class "mob" (because this is currently not exported).

References

Carolin Strobl, Florian Wickelmaier, Achim Zeileis (2010). Accounting for Individual Differences in Bradley-Terry Models by Means of Recursive Partitioning. Journal of Educational and Behavioral Statistics, Forthcoming. Preprint at http://statmath.wu.ac.at/~zeileis/papers/Strobl+Wickelmaier+Zeileis-2010.pdf

See Also

mob, btReg

Examples

## package
library("psychotree")

## Germany's Next Topmodel 2007 data
data("Topmodel2007", package = "psychotree")
## BT tree
tm_tree <- bttree(preference ~ ., data = Topmodel2007, minsplit = 5, ref = "Barbara")
plot(tm_tree, abbreviate = 1, yscale = c(0, 0.5))
## parameter instability tests in root node
sctest(tm_tree, node = 1)
## worth parameters in terminal nodes
worth(tm_tree)

## CEMS university choice data
data("CEMSChoice", package = "psychotree")
summary(CEMSChoice$preference)
## BT tree
cems_tree <- bttree(preference ~ french + spanish + italian + study + work + gender + intdegree,
  data = CEMSChoice, minsplit = 5, ref = "London")
plot(cems_tree, abbreviate = 1, yscale = c(0, 0.5))
worth(cems_tree)

[Package psychotree version 0.9-0 Index]