Learn R Programming

ItemResponseTrees

Item response tree (IR-tree) models like the one depicted below are a class of item response theory (IRT) models that assume that the responses to polytomous items can best be explained by multiple psychological processes (e.g., Böckenholt, 2012; Plieninger, 2020). The package ItemResponseTrees allows to fit such IR-tree models in mirt, TAM, and Mplus (via MplusAutomation).

The package automates some of the hassle of IR-tree modeling by means of a consistent syntax. This allows new users to quickly adopt this model class, and this allows experienced users to fit many complex models effortlessly.

Installation

You can install the released version of ItemResponseTrees from CRAN with:

install.packages("ItemResponseTrees")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("hplieninger/ItemResponseTrees")

Example

The IR-tree model depicted above can be fit as follows. For more details, see the vignette and ?irtree_model.

library("ItemResponseTrees")

m1 <- "
Equations:
1 = (1-m)*(1-t)*e
2 = (1-m)*(1-t)*(1-e)
3 = m
4 = (1-m)*t*(1-e)
5 = (1-m)*t*e

IRT:
t  BY  E1,   E2,   E3,   E4,   E5,   E6,   E7,   E8,   E9;
e  BY  E1@1, E2@1, E3@1, E4@1, E5@1, E6@1, E7@1, E8@1, E9@1;
m  BY  E1@1, E2@1, E3@1, E4@1, E5@1, E6@1, E7@1, E8@1, E9@1;

Class:
Tree
"

model1 <- irtree_model(m1)

fit1 <- fit(model1, data = jackson[, paste0("E", 1:9)])

glance( fit1)
tidy(   fit1, par_type = "difficulty")
augment(fit1)

Copy Link

Version

Install

install.packages('ItemResponseTrees')

Monthly Downloads

10

Version

0.2.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Hansj<c3><b6>rg Plieninger

Last Published

May 6th, 2020

Functions in ItemResponseTrees (0.2.5)

augment.irtree_fit

Augment data with information from an irtree_fit object
irtree_fit_tam

Fit an irtree_model using TAM
glance.irtree_fit

Glance at an irtree_fit object
fit.irtree_model

Fit an ItemResponseTrees model
irtree_create_template

Create a template of a model string
irtree_fit_mirt

Fit an irtree_model using mirt
irtree_gen_data

Generate data
irtree_model

ItemResponseTrees model syntax
irtree_sim

Run a simulation by generating from and fitting an ItemResponseTrees model
irtree_recode

Recode data into pseudoitems
irtree_sim1

Generate data from and fit an ItemResponseTrees model
tidy.irtree_fit

Tidy an irtree_fit object
pseudoitems

Pseudo-Items
write_mirt_input

Prepare a mirt model
irtree_gen_tree

Generate data from an IR-tree model
irtree_fit_mplus

Fit an IR-Tree Model using Mplus
jackson

IPIP Big Five personality test answers (data set)
write_mplus_input

Prepare an Mplus Input File
rtruncatednorm

Sample from a truncated normal distribution
reexports

Objects exported from other packages
irtree_gen_pcm

Generate data from a partial credit model
control_mplus

Control aspects of fitting a model in Mplus
control_mirt

Control aspects of fitting a model in mirt
ItemResponseTrees-package

IR-Tree Modeling in mirt, Mplus, or TAM
control_tam

Control aspects of fitting a model in TAM
extract_mirt_output-deprecated

Retrieve estimates from mirt.
ItemResponseTrees-deprecated

Deprecated functions in package ItemResponseTrees
extract_mplus_output-deprecated

Retrieve estimates From Mplus.
clps

Wrapper Around Paste to Collapse a Character Vector