Thanks. I tried running the model on the first imputation, which produces that warning about correlations near 1 of x3 with x5 and with x6. Indeed, I see that lavCor() shows correlations no higher than .65, but that is returning unconditional correlations. The default setting with categorical data is conditional.x=TRUE, which estimates residual correlations after partialing out exogenous covariates. When I look at your estimates for the first imputation, I can see a big problem:
fit1 <- sem(paths_1, data = impList[[1]], ordered = "x3")
lavInspect(fit1, "est")$psi
x4 x3 x5 x6
x4 4.060
x3 0.000 1.000
x5 0.000 0.000 0.834
x6 0.000 0.000 -26.229 0.830
Beyond the out-of-bounds residual covariance (partial correlation = -31.521), neither x3 nor x4 are correlated with x5 or x6 after x1, x2, and the 3 covariates are partialed out. That would rule out your mediation hypothesis, but of course this result is suspect because the x5-x6 correlation is impossibly large.
When I tried fitting the model without first partialing out exogenous effects, other warnings appear:
fit1 <- sem(paths_1, data = impList[[1]], ordered = "x3", conditional.x = FALSE)
Warning messages:
1: In muthen1984(Data = X[[g]], wt = WT[[g]], ov.names = ov.names[[g]], :
lavaan WARNING: trouble constructing W matrix; used generalized inverse for A11 submatrix
2: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING:
The variance-covariance matrix of the estimated parameters (vcov)
does not appear to be positive definite! The smallest eigenvalue
(= -4.133521e-19) is smaller than zero. This may be a symptom that
the model is not identified.
I think you might not have enough data to support estimating this model. Or this might simply be consistent with the result above: That there are no correlations to model after accounting for the covariates, which causes estimation problems when you try. When only 20 of 92 observed x3 values are in one category, it is not likely that the combination of predictors (nearly) completely accounts for those individual differences.
As a last resort, I even tried setting all your exogenous variables as.numeric in the original data to use estimator="PML" with pairwise deletion, while treating only x3 as categorical.
fit1 <- sem(paths_1, data = data_rep, ordered = "x3",
estimator = "PML", missing = "pairwise",
fixed.x = FALSE, conditional.x = FALSE)
This yielded a result, but neither of the mediators have significant effects (also problems with the model fit stats). Rather than trying to get this to work in the most ideal way, I would consider whether the obtainable results make it seem unreasonable to pursue this mediation model further, at least until/unless more data can be gathered. I say that while being completely naive about the nature or stakes of your study, so salt is needed.