| fit_model | R Documentation |
Chi-square goodness of fit between true and model based multivariate distribution. Handles both data with and without don't know responses automatically.
fit_model(pre_test, pst_test, g, est.param, force9 = FALSE)
fit_dk(pre_test, pst_test, g, est.param, force9 = FALSE)
fit_nodk(pre_test, pst_test, g, est.param)
pre_test |
data.frame carrying pre_test items |
pst_test |
data.frame carrying pst_test items |
g |
estimates of gamma produced from |
est.param |
estimated parameters produced from |
force9 |
Optional. Force 9-column format even if no DK responses. Default is FALSE. |
Unified Goodness of Fit Statistics
matrix with two rows: top row carrying chi-square value, bottom row p-values
## Not run:
# Fit model first
transmatrix <- multi_transmat(pre_test, pst_test)
res <- lca_cor(transmatrix)
# Calculate goodness of fit
fit_stats <- fit_model(pre_test, pst_test, res$param.lca[nrow(res$param.lca), ],
res$param.lca[-nrow(res$param.lca), ])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.