nnorOne | R Documentation |
This function generates DFI cutoffs for one-factor CFA models that treats items as continuous and non-normal with
possible missing data. This functions uses a modified Bollen-Stine bootstrap to accommodate non-normality and missingness rather
than simulating from a particular distribution. 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 (including threshold estimates). A primary difference in nnor DFI functions is that a dataset from which to bootstrap
must also be provided in the 'data' argument.
The app-based version of this function can be found at dynamicfit.app.
nnorOne(
model,
data,
n = NULL,
plot = FALSE,
manual = FALSE,
estimator = "MLR",
reps = 500
)
## S3 method for class 'nnorOne'
print(x, ...)
model |
This can either be a |
data |
An empirical dataset to which a modified Bollen-Stine bootstrap will be applied to create hypothetical misspecified data |
n |
If you entered a |
plot |
Displays distributions of fit indices for each level of misspecification.This also includes plots to visualize how close the distributions of the hypothetical data come to the original data. |
manual |
If you entered a |
estimator |
Which estimator to use within the simulations (enter in quotes). The default is MLR |
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 |
nnorOne object |
... |
other print parameters |
Dynamic fit index (DFI) cutoffs for SRMR, RMSEA, and CFI.
Daniel McNeish & Melissa G Wolf
Maintainer: Daniel McNeish <dmcneish@asu.edu>
#Example using a lavaan object as input (manual=FALSE)
#one-factor model
m1<-"F1=~X5+ X6 + X7 + X8 + X9"
#fit the model in lavaan, treating items are continuous
fit<-lavaan::cfa(m1, data=Example)
nnorOne(fit, data=Example)
#Manual entry example (manual=TRUE)
#one-factor model with correlated factors
m1<-"F1=~X5+ X6 + X7 + X8 + X9"
#fit the model, treating items are continuous
#lavaan is used here to shown where estimates come from
#but manual entry supports standardized estimates from models fit in any software
fit<-lavaan::cfa(m1, data=Example)
lavaan::standardizedsolution(fit)
manual_model <-"F1=~.517*X5 + .549*X6 + .679*X7 + .694*X8 + .203*X9"
nnorOne(model=manual_model,data=Example,n=500,manual=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.