thurstonianIRT (version 0.9.0)

make_mplus_code: Generate Mplus code for Thurstonian IRT models

Description

Generate Mplus code for Thurstonian IRT models

Usage

make_mplus_code(data, iter = 1000, eta_file = "eta.csv")

Arguments

data

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

iter

Maximum number of iterations of the model fitting algorithm.

eta_file

optional file name in which predicted trait scores should be stored.

Value

A list of Mplus code snippets to be interpreted by the MplusAutomation package.

Examples

Run this code
# NOT RUN {
sim_data <- sim_TIRT_data(
  npersons = 100,
  ntraits = 3,
  nblocks_per_trait = 4,
  gamma = 0,
  lambda = c(runif(6, 0.5, 1), runif(6, -1, -0.5)),
  Phi = diag(3)
)

# show the created Mplus code
lapply(make_mplus_code(sim_data), cat)

# }

Run the code above in your browser using DataLab