1

I am a psychology graduate student and I am trying to get the required statistics for my bifactor model according to APA. I was able to get the model to converge with some modifications to item loadings (there are 22 items total) using the step by Arndt Regorz. I have about 300 observations but the data may have some missing values. Any input on this would be greatly appreciated. I have copied and pasted the code I have below:

#Create a model for bifactor analysis
model_bif <- '

#Define the general factor
g =~ DTW_1 + DTW_2 + DTW_3 + DTW_6 + DTW_7 + DTW_8 + DTW_9 + DTW_10 + DTW_11 + DTW_12 + DTW_13 + DTW_14 + DTW_15 + DTW_16 + DTW_17 + DTW_18 + DTW_19 + DTW_20 + DTW_21 + DTW_22

#Define the specific factors
n =~ DTW_1 + DTW_2 + DTW_3 + DTW_4 + DTW_5 + DTW_6
m =~ DTW_7 + DTW_8 + DTW_9 + DTW_10
s =~ DTW_17 + DTW_19 + DTW_21

'

#Fit the model
fit_bif <- cfa(model_bif, data = dataset, orthogonal = TRUE)
summary(fit_bif, fit.measures = TRUE, standardized = TRUE)

#build a path diagram
semPaths(fit_bif, residuals=F,sizeMan=7,"std",
posCol=c("skyblue4", "red"),
#edge.color="skyblue4",
edge.label.cex=1.2,layout="circle2")

I have tried using the psych package but can't get the omega function to work. It continues to say "Error in m$n.obs : $ operator is invalid for atomic vectors".

1 Answers1

0

Since you used lavaan to fit your model to data, you can use the semTools package to obtain a variety of "omega" coefficients. I have fixed some bugs that aren't yet on CRAN, so install the development version using the remotes package:

remotes::install_github("simsem/semTools/semTools")
library(semTools)
compRelSEM(fit_bif, return.total = TRUE)

You can ignore the reliabilities of the method factors, unless you want to know the reliability of composites using those 3 subsets of items (and treating only the method-factor variance as "true" construct variance). If you are only interested in so-called "omega hierarchical", you could even omit them from the output:

compRelSEM(fit_bif, omit.factors = c("n","m","s"))

That would be the reliability of a scale composite calculated from all items, considering only the g factor as "true construct variance". But if you are additionally interested in so-called "omega total", which considers all sources of reliable variance (including method factors) as "true construct variance", then you need to leave those factors in, and request return.total = TRUE as in the first example above. Omega-total is the coefficient labeled total. See the ?compRelSEM help page for descriptions of other arguments (e.g., to obtain alpha; or to use model-implied rather than observed variance in the denominator, as was originally proposed for omega).

Terrence
  • 780
  • 4
  • 7