Splits respondents into `k` folds, fits each model on the remaining respondents, and scores the held-out respondents. Each fold must fit and converge; a failed fold stops with its fold number rather than silently changing the estimand by omitting its held-out responses.
Data frame containing one pre-test item per column.
Data frame containing the corresponding post-test items.
Must be empty.
Number of folds; an integer from 2 through the number of rows.
Optional integer seed used only to assign folds. It does not alter the caller's random-number-generator state.
Optional named feasible starting vector passed to [fit_item_lca_counts()].
List passed to the `control` argument of [fit_item_lca_counts()].
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.
A `guess_cv` object. `fold_results` records every fold and `fold_id` maps each input row to its held-out fold. Aggregate likelihood and perplexity are weighted by held-out observed item pairs. No standard error is reported because fold scores are dependent training-set refits, not independent replicate estimates.