Takes a model object, extracts model fit information, and formats it as a publication-ready table.

table_fit(x, ...)

Arguments

x

A model object for which a method exists.

...

Arguments passed to other functions.

Value

A data.frame of formatted results.

See also

Other Reporting tools: conf_int(), est_sig(), table_prob(), table_results()

Author

Caspar J. van Lissa

Examples

library(lavaan)
HS.model <- '  visual =~ x1 + x2 + x3
               textual =~ x4 + x5 + x6
               speed   =~ x7 + x8 + x9 '
fit <- cfa(HS.model,
           data = HolzingerSwineford1939,
           group = "school")
table_fit(fit)
#>   Name Parameters      fmin    chisq df       pvalue baseline.chisq baseline.df
#> 1  fit         60 0.1924441 115.8513 48 1.545283e-07       957.7691          72
#>   baseline.pvalue       cfi       tli      nnfi       rfi       nfi      pnfi
#> 1               0 0.9233984 0.8850976 0.8850976 0.8185606 0.8790404 0.5860269
#>         ifi       rni        LL unrestricted.logl      aic      bic   n
#> 1 0.9254192 0.9233984 -3682.198         -3624.272 7484.395 7706.822 301
#>       bic2      rmsea rmsea.ci.lower rmsea.ci.upper rmsea.pvalue       rmr
#> 1 7516.536 0.09691486     0.07450529      0.1195828 0.0005925388 0.0834983
#>   rmr_nomean       srmr srmr_bentler srmr_bentler_nomean       crmr crmr_nomean
#> 1 0.09146781 0.06786401   0.06786401           0.0743413 0.07434131  0.08311611
#>   srmr_mplus srmr_mplus_nomean    cn_05    cn_01       gfi      agfi      pgfi
#> 1 0.06786402        0.07434131 170.3239 192.4391 0.9950447 0.9888506 0.4422421
#>         mfi
#> 1 0.8934098