Adjusts observed 1s based on item level parameters of the LCA model. Currently only takes data with Don't Know. And treats don't know responses as true confessions on ignorance. By default, NAs are treated as acknowledgments of ignorance.
Pre-test data frame.
Post-test data frame.
Classification of NA responses: `"dk"` (the default) treats them as observed don't know responses; `"missing"` treats them as structural missingness.
How to handle structural missingness: `"omit"` excludes it and `"error"` rejects it.
list of pre and post adjusted responses
pre_test <- data.frame(item = c(1, 0, 0, 1, "d", "d", 0, 1, NA))
post_test <- data.frame(item = c(1, NA, 1, "d", 1, 0, 1, 1, "d"))
lca_adj(pre_test, post_test)
#> $pre
#> item
#> [1,] "0.000365429319659788"
#> [2,] "0"
#> [3,] "0"
#> [4,] "0.000365429319659788"
#> [5,] "0"
#> [6,] "0"
#> [7,] "0"
#> [8,] "0.000365429319659788"
#> [9,] "0"
#>
#> $pst
#> item
#> [1,] "0.800126634848862"
#> [2,] "0"
#> [3,] "0.800126634848862"
#> [4,] "0"
#> [5,] "0.800126634848862"
#> [6,] "0"
#> [7,] "0.800126634848862"
#> [8,] "0.800126634848862"
#> [9,] "0"
#>