I have been puzzled over the "sem" command with method(adf) and its handling of binary variables. In every case I can construct, the sem command does not produce standard errors for the error variance of the binary variables when using method(adf), whereas method(mle) will produce the standard errors. However, the advice for handling a CFA with binary variables is to use ADF, not MLE!
I have reconstructed the problem with the auto dataset for demonstration’s sake (code below), because the dataset I’m working with is very large. I had to expand the auto dataset, adding some random noise. I know the constructs make no sense and the groups I constructed do not come from an EFA, but my goal was to show the behavior of the command on an artificial dataset and keep things simple.

A few comments:
My questions are:
I have reconstructed the problem with the auto dataset for demonstration’s sake (code below), because the dataset I’m working with is very large. I had to expand the auto dataset, adding some random noise. I know the constructs make no sense and the groups I constructed do not come from an EFA, but my goal was to show the behavior of the command on an artificial dataset and keep things simple.
A few comments:
- It is not a convergence problem.
- It is not an identification problem. The model is identified. The matrices are admissible according to the program.
- However, the program complains that “the fitted model is not full rank” whenever it does not produce the error variance of the dummy variables- I’m not sure this matters to me, because I do not think the statistics Stata would display based on the fitted variance matrix would be relevant to the case where the factors might not be MVN distributed. The statistics that I find logical to display under violations of normality are indeed produced.
My questions are:
- Why is this occurring, and are the estimated error variances still trustworthy despite the fact that they do not have standard errors?
- The jackknife, surprisingly, can produce standard errors for the binary variables (and full rank e(V) matrix). Can I trust them? (The jackknife with my actual dataset has no invalid replications, unlike the auto dataset)
Code:
clear all sysuse auto, clear set seed 123456 ******************************************************************************** *ADF REQUIRES REALLY LARGE SAMPLE SIZE. *EXPAND THE SAMPLE AND ADD SOME NOISE TO THE EXPANDED SAMPLE. ******************************************************************************** local rowstoadd=50 local orig_obs=_N expand `rowstoadd' gen expandedpart=(_n>`orig_obs') local std_price=500 local std_gear_ratio=.25 foreach v in price gear_ratio { replace `v' = `v' + rnormal(0,`std_`v'') if expandedpart==1 } local spread_mpg=3 local spread_weight=200 local spread_displacement=3 local spread_turn=5 local spread_rep78 = 1 foreach v in mpg weight displacement turn rep78 { replace `v'=`v' + runiformint(-`spread_`v'',`spread_`v'') if expandedpart==1 } local spread_headroom=.1 foreach v in headroom { replace `v'=`v' + runiform(-`spread_`v'',`spread_`v'') if expandedpart==1 } gen switch_foreign=0 replace switch_foreign=rbinomial(4,.03) gen new_foreign=0 if foreign==1 & switch_foreign==1 & expandedpart==1 replace new_foreign=1 if foreign==0 & switch_foreign==1 & expandedpart==1 replace new_foreign=foreign if missing(new_foreign) tab foreign new_foreign replace foreign=new_foreign if expandedpart==1 drop new_foreign switch_foreign ******************************************************************************** *SHOW THE SEM RESULTS ******************************************************************************** *SHOW THAT ADF HAS MISSING STANDARD ERROR OF FOREIGN'S ERROR VARIANCE: sem (turn <- Engine@1 )(gear_ratio displacement rep78 <- Engine) /// (headroom <- Luxury@1 )(foreign trunk <- Luxury) /// (mpg <-Basic@1 ) (weight length <- Basic), method(adf) di "Converged=`e(conv)'" di "Admissible Matrix:" mat li e(admissible) *SHOW THAT MLE WORKS: sem (turn <- Engine@1 )(gear_ratio displacement rep78 <- Engine) /// (headroom <- Luxury@1 )(foreign trunk <- Luxury) /// (mpg <-Basic@1 ) (weight length <- Basic), method(ml) /// nolog
Comment