likertHB | R Documentation |
This function generates DFI cutoffs for multi-factor CFA models that treats Likert-type items as continuous.
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. A primary difference in likert DFI functions is that a dataset must also be provided in the 'data' argument
in order to simulate data with the same number of response options and response frequencies as the original data.
When Likert-type items are treated as continuous, this information cannot be obtained solely from model output.
The app-based version of this function can be found at dynamicfit.app.
likertHB(
model,
data,
n = NULL,
plot = FALSE,
manual = FALSE,
estimator = "ML",
reps = 250
)
## S3 method for class 'likertHB'
print(x, ...)
model |
This can either be a |
data |
An empirical dataset used to determine the number of Likert responses and the response frequencies |
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 simulated data are to the original data. |
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. |
x |
likertHB 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)
#two-factor model with correlated factors
m1<-"
F1=~X2 + X3 + X4
F2=~X6 + X7 + X8
F1~~F2"
#fit the model in lavaan, treating items are continuous
fit<-lavaan::cfa(m1, data=Example)
likertHB(fit, data=Example)
#Manual entry example (manual=TRUE)
#two-factor model with correlated factors
m1<-"
F1=~X2 + X3 + X4
F2=~X6 + X7 + X8
F1~~F2"
#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=~.554*X2 + .654*X3 + .733*X4
F2=~.537*X6 + .666*X7 + .723*X8
F1~~.339*F2"
likertHB(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.