View source: R/generate_tirt_mplus_syntax.R
| generate_tirt_mplus_syntax | R Documentation |
Generate Mplus Syntax for Thurstonian IRT (TIRT) or Thurstonian Factor Model (TFM)
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"
)
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_col |
Character string. The name of the column in |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.