exactFit {dynamic}R Documentation

DFI cutoffs for a Test of Exact Fit

Description

This function generates DFI cutoffs by treating the data generating model as the true model (using ML estimation). The default argument is a singular argument: a lavaan object from the cfa function. The function can also accommodate manual entry of the model statement and sample size.

Usage

exactFit(model, n, plot = FALSE, manual = FALSE, reps = 500)

## S3 method for class 'exactFit'
print(x, ...)

Arguments

model

This can either be a lavaan object from the cfa function, OR a model statement written in lavaan model.syntax with standardized loadings.

n

If you entered a lavaan object for model, leave this blank. Otherwise, enter your sample size (numeric).

plot

Displays distributions of fit indices for each fit index.

manual

If you entered a lavaan object, keep this set to FALSE. If you manually entered standardized loadings and sample size, set this to TRUE.

reps

(**Do not modify this**): The number of replications used in your simulation. This is set to 500 by default in both the R package and the corresponding Shiny App (not yet available).

x

exactFit object

...

other print parameters

Value

Dynamic fit index (DFI) cutoffs for Chi-Square, SRMR, RMSEA, and CFI.

Author(s)

Melissa G Wolf & Daniel McNeish

Maintainer: Melissa G Wolf <missgord@gmail.com>

Examples

#Lavaan object example (manual=FALSE)
dat <- lavaan::HolzingerSwineford1939
lavmod <- "F1 =~ x1 + x2 + x3
           F2 =~ x4 + x5 + x6
           F3 =~ x7 + x8 + x9"
fit <- lavaan::cfa(lavmod,dat)
exactFit(fit)

#Manual entry example for a sample size of 400 (manual=TRUE)
manmod <- "F1 =~ .602*Y1 + .805*Y2 + .516*Y3 + .415*Y4
           F2 =~ .413*Y5 + -.631*Y6
           F1 ~~ .443*F2
           Y4 ~~ .301*Y5"
exactFit(model=manmod,n=400,manual=TRUE)


[Package dynamic version 1.1.0 Index]