I am using the heterofactor command (https://www.stata-journal.com/articl...article=st0431), but it is not interacting properly with mle maximize options. For example, I want to stop after one iteration and I write:


local dep_vars "ln_mean_wage high_shool college black latino hgc_mother_1979"
local controls "black latino hgc_mother_1979 highest_grade_complete"
local testslist " asvab_8_1981 asvab_6_1981 asvab_5_1981 asvab_4_1981 asvab_10_1981 rotter_score_1979 rosenberg_esteem_score_1980"

heterofactor unwanted `dep_vars' , indvarsc(`controls') scores(`testslist') factors(2) numf1tests(5) numf2tests(2) triangular difficult fdistonly initialreg nohats nochoice nodes(4)"

but the output that I get is:

Estimating Initial Values Vector
Running Factor Model

Twostep option specified
Step: 1

Factor: 1

Iteration 0: log likelihood = -41281.163 (not concave)
Iteration 1: log likelihood = -40578.565 (not concave)
Iteration 2: log likelihood = -39899.142 (not concave)
Iteration 3: log likelihood = -39490.265 (not concave)
Iteration 4: log likelihood = -39334.409 (not concave)
Iteration 5: log likelihood = -39276.052 (not concave)
Iteration 6: log likelihood = -39235.622 (not concave)
Iteration 7: log likelihood = -39198.96
Iteration 8: log likelihood = -39130.351 (not concave)
Iteration 9: log likelihood = -39113.587
Iteration 10: log likelihood = -39095.938
Iteration 11: log likelihood = -39085.982
Iteration 12: log likelihood = -39083.795
Iteration 13: log likelihood = -39072.259

I have the same problem with ltolerance(#) or any maximize option.

Does someone know how to solve it?