npltree: Parametric Logisitic (n-PL) IRT Model Trees

View source: R/npltree.R

npltreeR Documentation

Parametric Logisitic (n-PL) IRT Model Trees

Description

Recursive partitioning (also known as trees) based on parametric logistic (n-PL) item response theory (IRT) models for global testing of differential item functioning (DIF).

Usage

npltree(formula, data, type = c("Rasch", "1PL", "2PL", "3PL", "3PLu", "4PL"),
  start = NULL, weights = NULL, grouppars = FALSE,
  vcov = TRUE, method = "BFGS", maxit = 500L,
  reltol = 1e-10, deriv = "sum", hessian = TRUE,
  full = TRUE, minsize = NULL, ...)

## S3 method for class 'npltree'
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 an item response matrix and x1 and x2 are used as partitioning variables. For the models estimated using marginal maximum likelihood (MML), it is additionally poosible to allow for impact of a group variable so that different ability distributions are estimated in each group. This can be specified by extending the previous formula by a group factor g as y ~ g | x1 + x2.

data

a data frame containing the variables in the model.

type

character, specifying either the type of IRT model in npltree (see also nplmodel) or the type of visualization to be used in the plot method, respectively.

start

an optional vector or list of starting values (see raschmodel or nplmodel).

weights

an optional vector of weights (interpreted as case weights).

grouppars

logical. Should the estimated distributional group parameters of a multiple-group model be included in the model parameters? (See nplmodel.)

vcov

logical or character specifying the type of variance-covariance matrix (if any) computed for the final models when fitted using MML (see nplmodel).

method

control parameter for the optimizer used by mirt for the EM algorithm when models are fitted using MML (see nplmodel).

maxit

control parameter for the optimizer used by raschmodel or nplmodel (see raschmodel, nplmodel).

reltol

control parameter for the optimizer used by raschmodel or nplmodel (see raschmodel, nplmodel).

deriv

character. Which type of derivatives should be used for computing gradient and Hessian matrix when fitting Rasch models with the conditional maximum likelihood (CML) method (see raschmodel)?

hessian

logical. Should the Hessian be computed for Rasch models fitted with the CML method (see raschmodel)?

full

logical. Should a full model object be returned for Rasch models fitted with the CML method (see raschmodel)?

minsize

The minimum number of observations in each node, which is passed to mob_control. If not set, it is 300 for 2PL models and 500 for 3PL, 3PLu, and 4PL models.

...

arguments passed to mob_control for npltree, and to the underlying plot method.

x

an object of class npltree.

terminal_panel, tp_args, tnex, drop_terminal

arguments passed to mob.

Details

Parametric logistic (n-PL) model trees are an application of model-based recursive partitioning (implemented in mob) to item response theory (IRT) models (implemented in raschmodel and nplmodel). While the "Rasch" model is estimated by conditional maximum likelihood (CML) all other n-PL models are estimated by marginal maximum likelihood (MML) via the standard EM algorithm. The latter allow the specification of multiple-group model to capture group impact on the ability distributions.

Various methods are provided for "npltree" objects, most of them inherit their behavior from "modelparty" objects (e.g., print, summary). Additionally, dedicated extractor functions or provided for the different groups of model parameters in each node of the tree: itempar (item parameters), threshpar (threshold parameters), guesspar (guessing parameters), upperpar (upper asymptote parameters).

Value

An object of S3 class "npltree" inheriting from class "modelparty".

See Also

mob, nplmodel, rstree, pctree, raschtree, gpcmtree

Examples

o <- options(digits = 4)

# fit a Rasch (1PL) tree on the SPISA data set
library("psychotree")
data("SPISA", package = "psychotree")
nplt <- npltree(spisa[, 1:9] ~ age + gender + semester + elite + spon, 
  data = SPISA, type = "Rasch")
nplt

# visualize
plot(nplt)

# compute summaries of the models fitted in nodes 1 and 2
summary(nplt, 1:2)

options(digits = o$digits)

psychotree documentation built on May 29, 2024, 12:06 p.m.