-----------------------------------------------------------------------------------------
       log:  /Users/baum/doc/Courses 2008-2009/EC771 S2009/771ml3.smcl
  log type:  smcl
 opened on:  28 Mar 2009, 11:07:01


. . adotype norm1_lf ~/Library/Application Support/Stata/ado/personal/norm1_lf.ado:

program norm1_lf version 10.1 args lnf mu sigma quietly replace `lnf' = ln(normalden($ML_y1,`mu',`sigma')) end

. . clear

. set obs 1000 obs was 0, now 1000

. set seed 20060320

. g x = _n

. g double y = 5 + 2*x + rnormal()

. summ

Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- x | 1000 500.5 288.8194 1 1000 y | 1000 1005.995 577.6354 6.813191 2005.264

. . ml model lf norm1_lf (mu: y=x) (sigma:)

. . * ml check . . ml maximize

initial: log likelihood = -<inf> (could not be evaluated) feasible: log likelihood = -19846.426 rescale: log likelihood = -7827.2389 rescale eq: log likelihood = -7827.2389 Iteration 0: log likelihood = -7827.2389 (not concave) Iteration 1: log likelihood = -7480.556 (not concave) Iteration 2: log likelihood = -6464.9017 (not concave) Iteration 3: log likelihood = -5804.0308 (not concave) Iteration 4: log likelihood = -5395.8557 (not concave) Iteration 5: log likelihood = -4911.5051 (not concave) Iteration 6: log likelihood = -4552.6285 (not concave) Iteration 7: log likelihood = -4063.1484 (not concave) Iteration 8: log likelihood = -3718.7517 (not concave) Iteration 9: log likelihood = -3362.0315 (not concave) Iteration 10: log likelihood = -2767.6832 (not concave) Iteration 11: log likelihood = -2469.41 (not concave) Iteration 12: log likelihood = -2149.7678 (not concave) Iteration 13: log likelihood = -1921.6578 (not concave) Iteration 14: log likelihood = -1701.057 Iteration 15: log likelihood = -1510.6729 Iteration 16: log likelihood = -1438.0681 Iteration 17: log likelihood = -1437.6783 Iteration 18: log likelihood = -1437.6772 Iteration 19: log likelihood = -1437.6772

Number of obs = 1000 Wald chi2(1) = 3.21e+08 Log likelihood = -1437.6772 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- mu | x | 1.999985 .0001116 17918.34 0.000 1.999766 2.000203 _cons | 5.003078 .0644902 77.58 0.000 4.87668 5.129477 -------------+---------------------------------------------------------------- sigma | _cons | 1.018915 .0227836 44.72 0.000 .9742603 1.06357 ------------------------------------------------------------------------------

. . log close log: /Users/baum/doc/Courses 2008-2009/EC771 S2009/771ml3.smcl log type: smcl closed on: 28 Mar 2009, 11:07:01 -----------------------------------------------------------------------------------------