Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Usage

## S4 method for signature 'FitDiff'
show(object)

## S4 method for signature 'FitDiff'
summary(object, fit.measures = "default", nd = 3)

Arguments

object

object of class FitDiff

fit.measures

character vector naming fit indices the user can request from fitMeasures. If "default", the fit measures will be c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr", "aic", "bic"). If "all", all available fit measures will be returned.

nd

number of digits printed

Slots

name

character. The name of each model

model.class

character. One class to which each model belongs

nested

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 the name slot, ordered by their df

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 '

out <- measurementInvariance(model = HS.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)

semTools

Useful Tools for Structural Equation Modeling

v0.5-4
GPL (>= 2)
Authors
Terrence D. Jorgensen [aut, cre] (<https://orcid.org/0000-0001-5111-6773>), Sunthud Pornprasertmanit [aut], Alexander M. Schoemann [aut] (<https://orcid.org/0000-0002-8479-8798>), Yves Rosseel [aut] (<https://orcid.org/0000-0002-4129-4477>), Patrick Miller [ctb], Corbin Quick [ctb], Mauricio Garnier-Villarreal [ctb] (<https://orcid.org/0000-0002-2951-6647>), James Selig [ctb], Aaron Boulton [ctb], Kristopher Preacher [ctb], Donna Coffman [ctb], Mijke Rhemtulla [ctb] (<https://orcid.org/0000-0003-2572-2424>), Alexander Robitzsch [ctb] (<https://orcid.org/0000-0002-8226-3132>), Craig Enders [ctb], Ruben Arslan [ctb] (<https://orcid.org/0000-0002-6670-5658>), Bell Clinton [ctb], Pavel Panko [ctb], Edgar Merkle [ctb] (<https://orcid.org/0000-0001-7158-0653>), Steven Chesnut [ctb], Jarrett Byrnes [ctb], Jason D. Rights [ctb], Ylenio Longo [ctb], Maxwell Mansolf [ctb] (<https://orcid.org/0000-0001-6861-8657>), Mattan S. Ben-Shachar [ctb] (<https://orcid.org/0000-0002-4287-4801>), Mikko Rönkkö [ctb] (<https://orcid.org/0000-0001-7988-7609>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.