View source: R/generate_cfc_lavaan_syntax.R
| generate_cfc_lavaan_syntax | R Documentation |
Generates the syntax required to fit a continuous Compositional Forced-Choice model (log-ratio differences of utilities) in lavaan, strictly adhering to Brown's (2016) formulation.
generate_cfc_lavaan_syntax(
n_blocks,
block_size,
key_matrix,
trait_col,
key_col,
cor_matrix = NULL,
force_positive_variances = TRUE
)
n_blocks |
Integer. Number of blocks. |
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. |
force_positive_variances |
Logical. If TRUE, prevents Heywood cases by forcing the utility uniquenesses to be > 0.001. Defaults to TRUE. |
A character string containing the lavaan model syntax.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.