Estimate the constrained latent-class model developed by Cor and Sood (2016) independently for each item. The model is fitted with [Rsolnp::solnp()] and requires its reported convergence code to be zero.

fit_item_lca_counts(transition_counts, ..., start = NULL, control = list())

Arguments

transition_counts

Named matrix of nonnegative whole-number transition counts returned by [count_item_transitions()].

...

Must be empty. Its presence requires optional arguments to be named.

start

Optional named feasible starting vector. When `NULL`, latent class weights start uniformly and `gamma` starts at its empirical transition-ratio estimate. A boundary estimate is moved inward by machine tolerance; an unidentified ratio starts at the admissible midpoint.

control

List passed to the `control` argument of [Rsolnp::solnp()].

Value

A `guess_fit` object. `diagnostics` records optimizer results by item. If `transition_counts` contains an `aggregate` row, its fit is stored separately in `aggregate` and excluded from item metadata.

References

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.

Examples

pre_test <- data.frame(item1 = c(1, 0, 0, 1, 0))
post_test <- data.frame(item1 = c(1, 0, 1, 1, 0))
transition_counts <- count_item_transitions(pre_test, post_test)
fit_item_lca_counts(transition_counts)
#> LCA Model Fit
#> ----------------------------------------
#> Items: 1  | Observations: 5 
#> Model: Without Don't Know 
#> 
#> Learning estimates:
#> item1 
#>   0.2 
#> 
#> Use summary() for parameter details, coef() to extract parameters.