Creates item transition counts from paired responses, then estimates the constrained latent-class model of Cor and Sood (2016) independently for each item. This is equivalent to calling [count_item_transitions()] followed by [fit_item_lca_counts()].
Data frame containing one pre-test item per column.
Data frame containing the corresponding post-test items.
Must be empty. Its presence requires optional arguments to be named.
Optional logical vector selecting observations to fit.
Whether to fit the item-total transition counts and store that fit separately in `aggregate`.
Classification of `NA` responses: `"dk"` treats them as observed don't-know responses and `"missing"` treats them as structural missingness.
How to handle structural missingness: `"omit"` excludes incomplete pairs and `"error"` rejects them.
Optional named feasible starting vector passed to [fit_item_lca_counts()].
List passed to the `control` argument of [Rsolnp::solnp()].
A `guess_fit` object. `diagnostics` records optimizer results by item. An aggregate fit, when requested, is stored separately and excluded from item metadata.
Cor, M. K., and Sood, G. (2016). Guessing and Forgetting: A Latent Class Model for Measuring Learning. *Political Analysis*, 24(2), 226–242.
Galanos, A., and Ye, Y. (2025). *Rsolnp: General Non-Linear Optimization*. R package version 2.0.1.
sim <- simulate_lca(n = 500, n_items = 2, seed = 123)
fit_item_lca(sim$pre, sim$post)
#> LCA Model Fit
#> ----------------------------------------
#> Items: 2 | Observations: 1000
#> Model: Without Don't Know
#>
#> Learning estimates:
#> item1 item2
#> 0.275 0.290
#>
#> Use summary() for parameter details, coef() to extract parameters.