cfaOne | R Documentation |
This function generates DFI cutoffs for one-factor CFA models 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.
The app-based version of this function can be found at dynamicfit.app.
cfaOne(
model,
n = NULL,
plot = FALSE,
manual = FALSE,
estimator = "ML",
reps = 500
)
## S3 method for class 'cfaOne'
print(x, ...)
model |
This can either be a |
n |
If you entered a |
plot |
Displays distributions of fit indices for each level of misspecification. |
manual |
If you entered a |
estimator |
Which estimator to use within the simulations (enter in quotes). The default is ML. |
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 |
cfaOne object |
... |
other print parameters |
Dynamic fit index (DFI) cutoffs for SRMR, RMSEA, and CFI.
Melissa G Wolf & Daniel McNeish
Maintainer: Melissa G Wolf <melissagordon@ucsb.edu>
#Lavaan object example (manual=FALSE)
dat <- lavaan::HolzingerSwineford1939
lavmod <- "F1 =~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9"
fit <- lavaan::cfa(lavmod,dat)
cfaOne(fit)
#Manual entry example for a sample size of 300 (manual=TRUE)
manmod <- "F1 =~ .602*Y1 + .805*Y2 + .857*Y3 + .631*Y4 + .345*Y5 + .646*Y6"
cfaOne(model=manmod,n=300,manual=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.