hier1HB: Dynamic fit index (DFI) cutoffs adapted from Hu & Bentler...

View source: R/hier1HB.R

hier1HBR Documentation

Dynamic fit index (DFI) cutoffs adapted from Hu & Bentler (1999) for measurement misspecification in hierarchical factor models

Description

This function generates DFI cutoffs adapted from Hu & Bentler (1999) for measurement misspecification in hierarchical factor models using, by default, 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.

The app-based version of this function can be found at dynamicfit.app.

Usage

hier1HB(
  model,
  n = NULL,
  estimator = "ML",
  plot = FALSE,
  manual = FALSE,
  reps = 500
)

## S3 method for class 'hier1HB'
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).

estimator

Which estimator to use within the simulations (enter in quotes). The default is maximum likelihood.

plot

Displays distributions of fit indices for each level of misspecification.

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

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.

x

hier1HB object

...

other print parameters

Value

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

Author(s)

Daniel McNeish, Melissa G Wolf, & Patrick D Manapat

Maintainer: Daniel McNeish <dmcneish@asu.edu>

Examples

#Manual entry example for a sample size of 2200 (manual=TRUE), from Reynolds & Keith (2017)

manmod <- "G =~ .51*F1 + .83*F2 + .97*F3 + .83*F4 + .87*F5 + .55*Y7
           F1 =~ .41*Y1 + .81*Y2 + .71*Y3
           F2 =~ .79*Y4 + .64*Y5 + .81*Y6 + .22*Y7
           F3 =~ .53*Y8 + .68*Y9 + .66*Y10
           F4 =~ .79*Y11 + .76*Y12
           F5 =~ .82*Y13 + .71*Y14 + .85*Y15 + .81*Y16
           F3 ~~ .77*F4"
hier2(model=manmod,n=2200,manual=TRUE)



melissagwolf/dynamic documentation built on June 29, 2024, 6:24 p.m.