Learn R Programming

semTools (version 0.4-13)

FitDiff-class: Class For Representing A Template of Model Fit Comparisons

Description

This class contains model fit measures and model fit comparisons among multiple models

Arguments

Objects from the Class

Objects can be created via the compareFit function.

Slots

methods

  • summary The summary function is used to provide the nested model comparison results and the summary of the fit indices across models. This function has one argument: fit.measures. If "default" is specified, chi-square values, degree of freedom, p value, CFI, TLI, RMSEA, SRMR, AIC, and BIC are provided. If "all" is specified, all information given in the fitMeasures function is provided. Users may specify a vector of the name of fit indices that they wish.

See Also

compareFit; clipboard

Examples

Run this code
HW.model <- ' visual =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed =~ x7 + x8 + x9 '

out <- measurementInvariance(HW.model, data=HolzingerSwineford1939, group="school", quiet=TRUE)
modelDiff <- compareFit(out)
summary(modelDiff)
summary(modelDiff, fit.measures="all")
summary(modelDiff, fit.measures=c("aic", "bic"))

## Not run: 
# # Save results to a file 
# saveFile(modelDiff, file="modelDiff.txt")
# 
# # Copy to a clipboard
# clipboard(modelDiff)
# ## End(Not run)

Run the code above in your browser using DataLab