guesstimate

lca_cor(transmatrix = NULL, nodk_priors = c(0.3, 0.1, 0.1, 0.25),
  dk_priors = c(0.3, 0.1, 0.2, 0.05, 0.1, 0.1, 0.05, 0.25))

Arguments

transmatrix

transition matrix returned from multi_transmat

nodk_priors

Optional. Vector of length 4. Priors for the parameters for model that fits data without Don't Knows

dk_priors

Optional. Vector of length 8. Priors for the parameters for model that fits data with Don't Knows

Value

list with two items: parameter estimates and estimates of learning

Examples

# Without DK pre_test <- data.frame(item1 = c(1, 0, 0, 1, 0), item2 = c(1, NA, 0, 1, 0)) pst_test <- pre_test + cbind(c(0, 1, 1, 0, 0), c(0, 1, 0, 0, 1)) transmatrix <- multi_transmat(pre_test, pst_test) res <- lca_cor(transmatrix)
#> #> Iter: 1 fn: 5.2746 Pars: 0.199999981704 0.400000011870 0.400000006134 0.000000009794 #> Iter: 2 fn: 5.2746 Pars: 0.199999981267 0.400000011896 0.400000006837 0.000000005512 #> solnp--> Completed in 2 iterations #> #> Iter: 1 fn: 5.2746 Pars: 0.40000002865 0.19999997059 0.40000000048 0.00000004602 #> Iter: 2 fn: 5.2746 Pars: 0.40000002183 0.19999997455 0.40000000362 0.00000002864 #> solnp--> Completed in 2 iterations