Dear Statalisters,
I am using ml command to do maximum likelihood estimation with normal distribution of error
terms. But the the result returned with an error message. I am new to ml command. I am just
playing with ml command and normal distribution to learn how to do mle using stata. Any
comments would be really appreciated. Many thanks.
Best regards,
Jian Zhang
Here is the code I wrote:
capture program drop try1
program try1
args lnf theta1 theta2
quietly replace `lnf'=-1/2*ln(`theta2')-1/2*($ML_y1-`theta1')
end
ml model lf try1 (year=i firm) ()
ml maximize
But the result shows as follows :
initial: log likelihood = -<inf> (could not be evaluated)
feasible: log likelihood = -97165.343
rescale: log likelihood = -60002.996
rescale eq: log likelihood = -60002.996
could not calculate numerical derivatives
discontinuous region with missing values encountered
r(430);
end of do-file
r(430);
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/