Description Usage Arguments Details Value References See Also Examples

Calculate cutoff values for model fit measures used in structural equation modeling (SEM) by simulating and testing data sets (cf. Hu & Bentler, 1999 <doi:10.1080/10705519909540118>) with the same parameters (population model, number of observations, etc.) as the model under consideration.

1 2 3 4 5 |

`model` |
lavaan-style Syntax of a user-specified model. |

`data` |
A data frame containing the variables specified in model. |

`n_obs` |
Specifies the number of observations. Only needed if no data frame is given. Can be given as a numeric vector representing the exact group sizes in multigroup analyses. In this case, the grouping variable needs to be called |

`n_rep` |
Number of replications. |

`fit_indices` |
Character vector, containing a selection of fit indices for which to calculate cutoff values. Only measures produced by fitMeasures can be chosen. |

`alpha_level` |
Type I-error rate for the generated cutoff values: Between 0 and 1; 0.05 per default. |

`normality` |
Specify distributional assumptions for the simulated data: Either |

`missing_data` |
Specify handling of missing values: Either |

`bootstrapped_ci` |
Specify whether a boostrapped confidence interval for the empirical model fit statistics should be drawn; default = FALSE. |

`n_boot` |
Number of replications in bootstrap for confidence intervalls for empirical model fit statistics. |

`boot_alpha` |
Type I-error rate choosen for the boostrap-confidence interval: Between 0 and 1; 0.05 per default. |

`boot_internal` |
Whether to use the internal boostrap implemented in |

`n_cores` |
The number of cores to use. If |

`...` |
Additional arguments to pass to lavaan. |

`model`

is expected in standard lavaan nomenclature. The typical pre-multiplication mechanism is supported, with the exception of vectors (see Examples). Multigroup models should instead be specified using the `group`

argument.

If `data`

is not specified, the program will generate data based on the given `model`

and `n_obs`

. A numeric vector would signify multiple groups and `group`

needs to be set to "group" in this case. Otherwise, `n_obs`

is disregarded.

`missing_data = TRUE`

assumes that the data is missing completely at random. That, is missings should not be distributed unevenly in multigroup models, for instance.

`bootstrapped_ci = "TRUE"`

Returns a nonparametric bootstrap confidence interval that quantifies the uncertainty within a data set with regard to the empirical fit indices. Larger sample sizes should, under ideal circumstances, have smaller confidence intervals. For more information see, e.g., Efron (1981; 1987). Bootstrapping uses the `library(boot)`

and (if available) several CPUs to compute the confidence intervals via `snow`

.

`...`

allows the user to pass lavaan arguments to the model fitting procedure. Options include multigroup, repeated measures, growth curve, and multilevel models.

An object of the class ezCutoffs, inspectable via `print`

, `summary`

, `plot`

, and
`compareFit`

Efron, D. (1981). Nonparametric estimates of standard error: The jackknife, the bootstrap and other methods, Biometrika, 68(3), 589-599. doi: 10.1093/biomet/68.3.589

Efron, B. (1987). Better bootstrap confidence intervals. Journal of the American statistical Association, 82(397), 171-185.

Hu, L. T., & Bentler, P. M. (1999). Cutoff criteria for fit indexes in covariance structure analysis: Conventional criteria versus new alternatives. Structural Equation Modeling: A Multidisciplinary Journal, 6(1), 1-55. doi: 10.1080/10705519909540118

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ```
## model specification examples
# simple uni-factorial model
model1 <- "F1 =~ a1 + a2 + a3 + a4 + a5"
# path model
model2 <- "m ~ 0.6*x1
m ~ 0.5*x2
m ~ 0.4*x3
y ~ 0.7*m"
# two-factorial model with some exemplary pre-multiplications
model3 <- "F1 =~ NA*a1 + a2 + a3 + 0.8*a4 + a5
F2 =~ b1 + start(0.8)*b2 + b3 + equal('F2 =~ b2')*b4 + b5
F1 ~~ 0*F2"
## function call
out <- ezCutoffs(model = model1, n_obs = 1000, n_rep = 10, n_cores = 1)
out <- ezCutoffs(
model = model1, n_obs = c(300, 400), n_rep = 9999, fit_indices = c("cfi.robust"),
estimator = "MLM", group = "group", group.equal = c("loadings", "intercepts"), n_cores = 1
)
## retrieve output
summary(out)
plot(out)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.