| RMdimCFAPlot | R Documentation |
Returns two figures (in a list) comparing the observed one-factor CFA to
the simulated null distribution from RMdimCFACutoff:
a per-item standardized-loadings plot (observed marker against each item's
simulated distribution and expected range, in the style of
RMitemInfitPlot), and a faceted plot of the CFI / RMSEA
/ SRMR distributions with the observed value overlaid.
RMdimCFAPlot(simfit, data, percentile = NULL)
simfit |
The list returned by |
data |
The item-response data the CFA was run on (the same items used for the cutoff). Required: the observed values are computed from it. |
percentile |
Numeric in (50, 100) or |
A named list of two ggplot objects:
loadingsPer-item standardized loadings: simulated distribution (dots), expected interval, and the observed loading as a diamond (red when flagged).
fitFaceted CFI / RMSEA / SRMR simulated distributions with the observed value and cutoff overlaid.
RMdimCFACutoff, RMdimCFA
if (requireNamespace("lavaan", quietly = TRUE) &&
requireNamespace("ggplot2", quietly = TRUE) &&
requireNamespace("eRm", quietly = TRUE)) {
data("raschdat1", package = "eRm")
sim <- RMdimCFACutoff(raschdat1[, 1:8], iterations = 50,
parallel = FALSE, seed = 1)
plots <- RMdimCFAPlot(sim, data = raschdat1[, 1:8])
plots$loadings
plots$fit
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.