bttree | R Documentation |
Recursive partitioning (also known as trees) based on Bradley-Terry models.
bttree(formula, data, na.action, cluster,
type = "loglin", ref = NULL, undecided = NULL, position = NULL, ...)
## S3 method for class 'bttree'
predict(object, newdata = NULL,
type = c("worth", "rank", "best", "node"), ...)
formula |
A symbolic description of the model to be fit. This
should be of type |
data |
an optional data frame containing the variables in the model. |
na.action |
A function which indicates what should happen when the data
contain |
cluster |
optional vector (typically numeric or factor) with a cluster ID to be employed for clustered covariances in the parameter stability tests. |
type |
character indicating the type of auxiliary model in |
ref , undecided , position |
arguments for the Bradley-Terry
model passed on to |
... |
arguments passed to |
object |
fitted model object of class |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used. |
Bradley-Terry trees are an application of model-based recursive partitioning
(implemented in mob
) to Bradley-Terry models for
paired comparison data (implemented in btmodel
).
Details about the underlying theory and further explanations of the
illustrations in the example section can be found in
Strobl, Wickelmaier, Zeileis (2011).
Various methods are provided for "bttree"
objects, most of them
inherit their behavior from "mob"
objects (e.g., print
, summary
,
etc.). itempar
behaves analogously to coef
and extracts the
worth/item parameters from the BT models in the nodes of the tree. The plot
method employs the node_btplot
panel-generating function.
An object of S3 class "bttree"
inheriting from class "modelparty"
.
Strobl C, Wickelmaier F, Zeileis A (2011). Accounting for Individual Differences in Bradley-Terry Models by Means of Recursive Partitioning. Journal of Educational and Behavioral Statistics, 36(2), 135–153. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3102/1076998609359791")}
mob
, btmodel
o <- options(digits = 4)
## Germany's Next Topmodel 2007 data
data("Topmodel2007", package = "psychotree")
## BT tree
tm_tree <- bttree(preference ~ ., data = Topmodel2007, minsize = 5, ref = "Barbara")
plot(tm_tree, abbreviate = 1, yscale = c(0, 0.5))
## parameter instability tests in root node
if(require("strucchange")) sctest(tm_tree, node = 1)
## worth/item parameters in terminal nodes
itempar(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, minsize = 5, ref = "London")
plot(cems_tree, abbreviate = 1, yscale = c(0, 0.5))
itempar(cems_tree)
options(digits = o$digits)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.