| person_item_lca_fit | R Documentation |
Fits one latent transition class per person across repeated items. Class proportions are shared across items, while guessing probabilities are item-specific. Parameters are estimated jointly by expectation-maximization.
person_item_lca_fit(
pre_test,
pst_test,
na_as = c("dk", "missing"),
missing_action = c("omit", "error"),
item_fit = NULL,
max_iter = 1000L,
tol = 1e-08
)
pre_test |
data frame of pre-test responses |
pst_test |
data frame of post-test responses |
na_as |
classification of NA responses |
missing_action |
structural missingness handling |
item_fit |
optional item-wise fit used to initialize the EM algorithm |
max_iter |
maximum EM iterations |
tol |
convergence tolerance |
This is distinct from item_lca_fit, which fits independent
class proportions for each item.
An object of class guess_person_fit containing shared class
proportions, item-specific guessing probabilities, person-level posterior
probabilities, log-likelihood, and convergence information.
sim <- simulate_lca(n = 500, n_items = 4, seed = 123)
fit <- person_item_lca_fit(sim$pre, sim$post)
fit$class_priors
head(fit$posterior)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.