Hello!
I have the following ML program:
The program does not work when estimating a simple regression. "ml check" cannot find feasible initial values. It does work when I remove the ln in y-xb, providing the same result as with regress.
What is the problem?
I have the following ML program:
which is basically the same of a normal distribution, but with the y-xb in logs. As far as I know, the log-normal can be represented as the normal of the log of a variable, and so to me that transformation makes sense.Code:capture program drop lfln program lfln version 12.1 args lnf xb sigma local y "$ML_y1" quietly replace `lnf' = ln(normalden(ln((`y'-`xb'))/`sigma')) - ln(`sigma') end
The program does not work when estimating a simple regression. "ml check" cannot find feasible initial values. It does work when I remove the ln in y-xb, providing the same result as with regress.
What is the problem?
Comment