Rasch Trees

Description

Recursive partitioning (also known as trees) based on Rasch models.

Usage

raschtree(formula, data, na.action,
  reltol = 1e-10, deriv = c("sum", "diff", "numeric"), maxit = 100L,
  ...)

## S3 method for class 'raschtree'
predict(object, newdata = NULL,
  type = c("probability", "cumprobability", "mode", "median", "mean",
    "category-information", "item-information", "test-information", "node"),
  personpar = 0, ...)

## S3 method for class 'raschtree'
plot(x, type = c("profile", "regions"), terminal_panel = NULL,
  tp_args = list(...), tnex = 2L, drop_terminal = TRUE, ...)

Arguments

formula A symbolic description of the model to be fit. This should be of type y ~ x1 + x2 where y should be a binary 0/1 item response matrix and x1 and x2 are used as partitioning variables.
data a data frame containing the variables in the model.
na.action a function which indicates what should happen when the data contain missing values (NAs).
deriv character. Which type of derivatives should be used for computing gradient and Hessian matrix? Analytical with sum algorithm (“sum”), analytical with difference algorithm (“diff”, faster but numerically unstable), or numerical. Passed to raschmodel.
reltol, maxit arguments passed via raschmodel to optim.
arguments passed to the underlying functions, i.e., to mob_control for raschtree, and to the underlying predict and plot methods, respectively.
object, x an object of class “raschtree”.
newdata optional data frame with partitioning variables for which predictions should be computed. By default the learning data set is used.
type character specifying the type of predictions or plot. For the predict method, either just the ID of the terminal “node” can be predicted or some property of the model at a given person parameter (specified by personpar).
personpar numeric person parameter (of length 1) at which the predictions are evaluated.
terminal_panel, tp_args, tnex, drop_terminal arguments passed to plot.modelparty/plot.party.

Details

Rasch trees are an application of model-based recursive partitioning (implemented in mob) to Rasch models (implemented in raschmodel). See Strobl et al. (2015) 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 “raschtree” objects, most of them inherit their behavior from “modelparty” objects (e.g., print, summary, etc.). For the Rasch models in the nodes of a tree, coef extracts all item parameters except the first one which is always restricted to be zero. itempar extracts all item parameters (including the first one) and by default restricts their sum to be zero (but other restrictions can be used as well). The plot method by default employs the node_profileplot panel-generating function and the node_regionplot panel-generating function is provided as an alternative.

Rasch tree models are introduced in Strobl et al. (2015), whose analysis for the SPISA data is replicated in vignette(“raschtree”, package = “psychotree”). Their illustration employing artificial data is replicated below.

Value

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

References

Strobl C, Kopf J, Zeileis A (2015). Rasch Trees: A New Method for Detecting Differential Item Functioning in the Rasch Model. Psychometrika, 80(2), 289–316. doi:10.1007/s11336-013-9388-3

See Also

mob, raschmodel, rstree, pctree

Examples

library("psychotree")

o <- options(digits = 4)

## artificial data
data("DIFSim", package = "psychotree")

## fit Rasch tree model
rt <- raschtree(resp ~ age + gender + motivation, data = DIFSim)
plot(rt)

## extract item parameters
itempar(rt)
    resp1  resp2 resp3  resp4   resp5  resp6   resp7    resp8  resp9  resp10
3 0.41354 1.7416 4.053 0.2700 -0.2995 -1.237 -0.1562  0.12779 -1.831 -0.5928
4 0.05796 0.7298 1.026 0.8747  0.2539 -1.175 -1.0231 -0.07179 -1.419  0.1883
5 0.31447 0.4851 2.699 0.4851 -0.5527 -1.372 -0.7737 -0.06814 -1.504  0.5433
   resp11 resp12 resp13  resp14  resp15 resp16 resp17   resp18  resp19  resp20
3  0.1278 -1.831 -1.065 -2.0719 -1.2368 1.9610  1.961 -0.15621 -0.5928  0.4135
4 -0.9493 -1.336 -1.175  0.5897  1.0258 1.3536  2.078  0.05798 -0.9493 -0.1367
5  0.6024 -1.864 -1.245  0.3145  0.9134 0.6623  1.589 -0.06814 -0.7178 -0.4442
## inspect parameter stability tests in all splitting nodes
if(require("strucchange")) {
sctest(rt, node = 1)
sctest(rt, node = 2)
}
                age gender motivation
statistic 6.126e+01      0     86.252
p.value   3.613e-04     NA      0.926
## highlight items 3 and 14 with DIF
ix <- rep(1, 20)
ix[c(3, 14)] <- 2
plot(rt, ylines = 2.5,  cex = c(0.4, 0.8)[ix], 
  pch = c(19, 19)[ix], col = gray(c(0.5, 0))[ix])

options(digits = o$digits)