thurstonianIRT (version 0.9.0)

fit_TIRT_mplus: Fit Thurstonian IRT models in Mplus

Description

Fit Thurstonian IRT models in Mplus

Usage

fit_TIRT_mplus(data, ...)

Arguments

data

An object of class 'TIRTdata'. see make_TIRT_data for documentation on how to create one.

...

Further arguments passed to mplusModeler.

Value

A 'TIRTfit' object.

Examples

Run this code
# NOT RUN {
# load the data
data("triplets")

# define the blocks of items
blocks <-
  set_block(c("i1", "i2", "i3"), traits = c("t1", "t2", "t3"),
          signs = c(1, 1, 1)) +
  set_block(c("i4", "i5", "i6"), traits = c("t1", "t2", "t3"),
            signs = c(-1, 1, 1)) +
  set_block(c("i7", "i8", "i9"), traits = c("t1", "t2", "t3"),
            signs = c(1, 1, -1)) +
  set_block(c("i10", "i11", "i12"), traits = c("t1", "t2", "t3"),
            signs = c(1, -1, 1))

# generate the data to be understood by 'thurstonianIRT'
triplets_long <- make_TIRT_data(
  data = triplets, blocks = blocks, direction = "larger",
  format = "pairwise", family = "bernoulli", range = c(0, 1)
)

# }
# NOT RUN {
# fit the data using Mplus
fit <- fit_TIRT_mplus(triplets_long)
print(fit)
predict(fit)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab