Learn R Programming

psychotree (version 0.12-2)

raschtree: Rasch Tree Models

Description

Recursive partitioning based on Rasch models.

Usage

raschtree(formula, data, minsplit = 10, gradtol = 1e-6,
  deriv = c("sum", "diff", "numeric"), ...)

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 matrix and x1 and x2 are used as partitioning variables.
data
a data frame containing the variables in the model.
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
gradtol
numeric tolerance passed to RaschModel and on to nlm.
minsplit, ...
arguments passed to mob_control.

Value

  • An object of S3 class "raschtree" which is a list containing only a single element of S4 class "mob" (because this is currently not exported from the party package).

encoding

latin1

Details

Rasch tree models are an application of model-based recursive partitioning (implemented in mob) to Rasch models (implemented in RaschModel). Various methods are provided for "raschtree" objects, most of them inherit their behavior from "mob" 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. worth extracts all item parameters (including the first one) and restricts their sum to be zero. The plot method employs the node_raschplot panel-generating function.

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

References

Strobl, C., Kopf, J., and Zeileis, A. (2010). A New Method for Detecting Differential Item Functioning in the Rasch Model. Technical Report 92. Department of Statistics, Ludwig-Maximilians-Universit�t M�nchen. http://epub.ub.uni-muenchen.de/11915/

See Also

mob, RaschModel, bttree

Examples

Run this code
## artificial data
data("DIFSim", package = "psychotree")

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

## extract item parameters
coef(rt)
worth(rt)

## inspect parameter stability tests in all splitting nodes
sctest(rt, node = 1)
sctest(rt, node = 2)

## 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])

Run the code above in your browser using DataLab