Learn R Programming

kfa (version 0.2.2)

k_model_fit: Extract model fit

Description

Model fit indices extracted from k-folds

Usage

k_model_fit(models, index = "default", by.fold = TRUE)

Value

list of data.frames with average model fit for each factor model

Arguments

models

an object returned from kfa

index

character; one or more fit indices to summarize in the report. Use index_available to see choices. Chi-square value and degrees of freedom are always reported. Default is CFI and RMSEA (naive, scaled, or robust version depends on estimator used in models).

by.fold

Should each element in the returned lists be a fold (default) or a factor model?

Examples

Run this code
data(example.kfa)

# customize fit indices to report
k_model_fit(example.kfa, index = c("chisq", "cfi", "rmsea", "srmr"))

# organize results by factor model rather than by fold
k_model_fit(example.kfa, by.fold = FALSE)

Run the code above in your browser using DataLab