irtree_fit_mplus: Fit an IR-Tree Model using Mplus

Description Usage Arguments Examples

View source: R/fit-mplus.R

Description

This function takes a data frame and a model string and runs the model in Mplus.

Usage

1
2
3
4
5
6
7
8
irtree_fit_mplus(
  object = NULL,
  data = NULL,
  link = c("logit", "probit"),
  verbose = interactive(),
  control = control_mplus(),
  improper_okay = FALSE
)

Arguments

object

Object of class irtree_model. See irtree_model for more information.

data

Data frame containing containing one row per respondent and one column per variable. The variable names must correspond to those used in object.

link

String, passed to argument 'LINK' in Mplus. Specifies the link function.

verbose

Logical indicating whether output should be printed to the console.

control

List. The allowed elements of this list depend on the engine. Use control_mirt(), control_mplus(), or control_tam() for convenience. Note that the fit() function does not use ..., but that you can use the control_*() functions to pass additional arguments.

improper_okay

Logical indicating whether the model should also be fit if it is not a proper IR-tree model. Set this only to TRUE if you really know what you are doing.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
run <- MplusAutomation::mplusAvailable() == 0

m1 <- "
IRT:
attitude BY Comfort, Work, Future, Benefit;

Class:
GRM
"
model1 <- irtree_model(m1)
data(Science, package = "mirt")

fit1 <- fit(model1, Science, engine = "mplus",
            control = control_mplus(run = run))

ItemResponseTrees documentation built on July 2, 2020, 2:25 a.m.