FitDiff-class {semTools} | R Documentation |
Class For Representing A Template of Model Fit Comparisons
Description
This class contains model fit measures and model fit comparisons among multiple models
Usage
## S4 method for signature 'FitDiff'
show(object)
## S4 method for signature 'FitDiff'
summary(object, fit.measures = "default", nd = 3, tag = "†")
Arguments
object |
object of class |
fit.measures |
|
nd |
number of digits printed |
tag |
single |
Slots
name
character
. The name of each modelmodel.class
character
. One class to which each model belongsnested
data.frame
. Model fit comparisons between adjacently nested models that are ordered by their degrees of freedom (df)fit
data.frame
. Fit measures of all models specified in thename
slot, ordered by their dffit.diff
data.frame
. Sequential differences in fit measures in thefit
slot
Objects from the Class
Objects can be created via the
compareFit
function.
Author(s)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
Sunthud Pornprasertmanit (psunthud@gmail.com)
See Also
Examples
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit.config <- cfa(HS.model, data = HolzingerSwineford1939, group = "school")
## invariance constraints
fit.metric <- cfa(HS.model, data = HolzingerSwineford1939, group = "school",
group.equal = "loadings")
fit.scalar <- cfa(HS.model, data = HolzingerSwineford1939, group = "school",
group.equal = c("loadings","intercepts"))
fit.strict <- cfa(HS.model, data = HolzingerSwineford1939, group = "school",
group.equal = c("loadings","intercepts","residuals"))
measEqOut <- compareFit(fit.config, fit.metric, fit.scalar, fit.strict)
summary(measEqOut)
summary(measEqOut, fit.measures = "all")
summary(measEqOut, fit.measures = c("aic", "bic"))
## Not run:
## Save results to a file
saveFile(measEqOut, file = "measEq.txt")
## Copy to a clipboard
clipboard(measEqOut)
## End(Not run)