Hello Statalist users,
I am getting a strange instance of the error "Convergence not achieved" which does not occur with my controls for my whole analytical sample, but does occur when examining educational subgroups.
The controls which work are as follows:
But they break down under a couple of conditions. Below are the controls applied to a subgroup (those with high school education or less):
With this code, Stata iterates until the "Convergence" error occurs. The option -difficult- does not help, and if I knew how many iterations to expect, I would run them, but it exceeds the number of observations in the subsample. If I knew how many to expect, I would also simply use the option "iterate(number)".
There seem to be two offending elements in the second line of code that may be responsible.
1) Without "naics_21" (21 occupational categories from the North American Industrial Classification System), Stata gives outputs with no issue. Curiously, if I prefix it with c. (instead of i.), the outputs come back with no issue, but of course it does not seem like an appropriate solution to treat "naics_21" as continuous.
2) On the other hand, it is the subsample ("if edu==0") which also triggers numerous "iterations" in output. When this is removed (as well as "edu") it comes back fine, but this is not substantively very different from the first line of code in this post, and so is not meaningful or useful.
Is it possible either to find out how many iterations to expect, or to run the above controls for the selected subgroup without causing all these iterations?
I am getting a strange instance of the error "Convergence not achieved" which does not occur with my controls for my whole analytical sample, but does occur when examining educational subgroups.
The controls which work are as follows:
Code:
logit lfs sex##survmnth##loneyg i.noc_40 i.naics_21 i.ftpt i.cowmain c.tenlfs i.age_12 i.marstat i.immig i.prov i.edu [pweight=finalwt], or
Code:
logit lfs sex##survmnth##loneyg i.noc_40 i.naics_21 i.ftpt i.cowmain c.tenlfs i.age_12 i.marstat i.immig i.prov if edu==0 [pweight=finalwt], or
There seem to be two offending elements in the second line of code that may be responsible.
1) Without "naics_21" (21 occupational categories from the North American Industrial Classification System), Stata gives outputs with no issue. Curiously, if I prefix it with c. (instead of i.), the outputs come back with no issue, but of course it does not seem like an appropriate solution to treat "naics_21" as continuous.
2) On the other hand, it is the subsample ("if edu==0") which also triggers numerous "iterations" in output. When this is removed (as well as "edu") it comes back fine, but this is not substantively very different from the first line of code in this post, and so is not meaningful or useful.
Is it possible either to find out how many iterations to expect, or to run the above controls for the selected subgroup without causing all these iterations?
Comment