generate_tirt_mplus_syntax: Generate Mplus Syntax for Thurstonian IRT (TIRT) or...

View source: R/generate_tirt_mplus_syntax.R

generate_tirt_mplus_syntaxR Documentation

Generate Mplus Syntax for Thurstonian IRT (TIRT) or Thurstonian Factor Model (TFM)

Description

Generate Mplus Syntax for Thurstonian IRT (TIRT) or Thurstonian Factor Model (TFM)

Usage

generate_tirt_mplus_syntax(
  title = "TIRT Model",
  data_file,
  n_blocks,
  block_size,
  key_matrix,
  trait_col,
  key_col,
  cor_matrix = NULL,
  model_type = c("TIRT", "TFM"),
  tfm_free_pair_residuals = TRUE,
  estimator = c("WLSMV", "ULSMV", "ULS"),
  missing_code = "*",
  force_positive_variances = TRUE,
  quick_run = FALSE,
  out_file = "tirt_model.inp"
)

Arguments

title

Character. Title of the Mplus model.

data_file

Character. Name of the input data file.

n_blocks

Integer. Number of blocks in the questionnaire.

block_size

Integer. Number of items per block.

key_matrix

A data.frame indicating item trait and item sign.

trait_col

Character string. The name of the column in key_matrix indicating the trait measured by the item.

key_col

Character string. The name of the column in key_matrix indicating the keying direction of the item (e.g., positive/negative).

cor_matrix

Optional matrix. Starting values for trait correlations.

model_type

Character. Choose "TIRT" for the First-Order parameterization or "TFM" for the Second-Order parameterization.

tfm_free_pair_residuals

Logical. In the TFM model, should the residual variance of the observed pairs be freely estimated? Defaults to TRUE.

estimator

Character. The Mplus estimator to use ("WLSMV", "ULSMV", "ULS").

missing_code

Numeric or Character. The value representing missing data.

force_positive_variances

Logical. Constrain residual variances to be strictly positive (> 0.001/0) to prevent Heywood cases. Defaults to TRUE.

quick_run

Logical. Specify TRUE to speed up estimation by not producing Chi-Square and standard errors. Defaults to FALSE.

out_file

Character. The filename to save the generated Mplus syntax.


autoFC documentation built on July 14, 2026, 5:07 p.m.