Hello,
I try to evaluate a theoretical CFA model. I am generating the samples with the
simsem package according to the following model:

data <- generate(CFA.Model,200) #Generate a sample of multivariate normal distribution
Then I transform the data to categorical variables with the following function:
DichoData <- function(data,q){
D <- data.frame(ifelse (data < apply(data,2,quantile,q),0,1))
return(D)
}
With the implementation of the lavaan package, the model is as follows:
Model <- "
f1 =~ y1 + y2 + y3
f2 =~ y4 + y5 + y6
f1 ~~ f2
"
# With original data
fit.1 <- cfa(model = Model, data = data, std.lv = TRUE)
To implement the model with categorical variables, the "order" argument is added:
# With categorical data
fit.2 <- cfa(model = Model, data = DichoData(data,0.5), std.lv = T, order = names(data))
However, the model is estimated with DWLS. I would like to run the model with "ML", "WLS" or "ULS". The question is: Could I evaluate the model with the matrix of tetrachoric correlations? like this:
# Alternative
require(psych)
fit.3 <- cfa(model = Model, sample.cov = tetrachoric(DichoData(data,0.5))$rho,
sample.nobs = 200, std.lv = T, estimator = "ML")
fit.4 <- cfa(model = Model, sample.cov = tetrachoric(DichoData(data,0.5))$rho,
sample.nobs = 200, std.lv = T, estimator = "ULS")
fit.5 <- cfa(model = Model, sample.cov = tetrachoric(DichoData(data,0.5))$rho,
sample.nobs = 200, std.lv = T, estimator = "WLS")
The fit.3 and fit.4 models converge without problems, and the estimates of the parameters of the model are acceptable. The fit.5 model does not work because it needs the weight matrix.
Is it reasonable to assume that if the results are similar, then the method is acceptable?
Thanks for your attention.