Hello evryone,
I'm fitting a sem model that includes different latent variables and regressions.
I have some missing data that will affect the whole model, therefore I had to use the pairwise method.
I wonder if lavaan could give me the number of cases (observations) used for calculating each regression, considering that this number will vary due to the pairwise method. It is important to me to know the percentage of data used for each regression.
I tried the semTable package but it seems to not have this feature.
That's the main part of my code:
``` r
model <- lavaan::sem(
model = syntax,
data = data,
estimator = "DWLS",
missing = "pairwise",
verbose = TRUE,
control = list(iter.max = 5000),
optim.method = list("NLMINB"),
)
sum <- summary(model, standardized = TRUE, fit.measures = TRUE)
```
And the main output is the following (notice the number of missing patterns):
```
lavaan 0.6.13 ended normally after 1187 iterations
Estimator DWLS
Optimization method NLMINB
Number of model parameters 481
Number of observations 1368
Number of missing patterns 13
Model Test User Model:
...
```
I can share the complete script and output if needed.
Regards,
Guilherme