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. If NAs are observed in the data, they are treating as acknowledgments of ignorance.

lca_adj(pre = NULL, pst = NULL)

Arguments

pre

pre data frame

pst

pst data frame

Value

list of pre and post adjusted responses

Examples

pre_test_var <- data.frame(pre = c(1, 0, 0, 1, "d", "d", 0, 1, NA)) pst_test_var <- data.frame(pst = c(1, NA, 1, "d", 1, 0, 1, 1, "d")) lca_adj(pre_test_var, pst_test_var)
#> Warning: NAs will be converted to 0. MCAR is assumed.
#> #> Iter: 1 fn: 17.5257 Pars: 0.166666645005 0.277777812540 0.222222217648 0.111111118617 0.166666663007 0.055555538662 0.000000004572 0.333333280399 #> Iter: 2 fn: 17.5257 Pars: 0.166666645532 0.277777811891 0.222222218702 0.111111119481 0.166666663326 0.055555538899 0.000000002168 0.333333279976 #> solnp--> Completed in 2 iterations
#> $pre #> pre #> [1,] 0.3333334 #> [2,] 1.0000000 #> [3,] 1.0000000 #> [4,] 0.3333334 #> [5,] 3.0000000 #> [6,] 3.0000000 #> [7,] 1.0000000 #> [8,] 0.3333334 #> [9,] 1.0000000 #> #> $pst #> pst #> [1,] 0.8 #> [2,] 1.0 #> [3,] 0.8 #> [4,] 3.0 #> [5,] 0.8 #> [6,] 1.0 #> [7,] 0.8 #> [8,] 0.8 #> [9,] 3.0 #>