-------------------------------------------------------------------------------
log: /Users/baum/doc/Courses 2005-2006/EC77101/771ml3.smcl
log type: smcl
opened on: 20 Mar 2006, 14:35:34
.
. adotype norm1_lf
~/ado/personal/norm1_lf.ado:
program norm1_lf
version 8.2
args lnf mu sigma
quietly replace `lnf' = ln(normden($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 + invnormal(uniform())
. summ
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
x | 1000 500.5 288.8194 1 1000
y | 1000 1006.022 577.6485 7.394469 2005.3
.
. ml model lf norm1_lf (mu: y=x) (sigma:)
.
. * ml check
.
. ml maximize
initial: log likelihood = -<inf> (could not be evaluated)
feasible: log likelihood = -15522.434
rescale: log likelihood = -7913.293
rescale eq: log likelihood = -7875.4733
Iteration 0: log likelihood = -7875.4733 (not concave)
Iteration 1: log likelihood = -7401.2257 (not concave)
Iteration 2: log likelihood = -7092.6888 (not concave)
Iteration 3: log likelihood = -6704.0267 (not concave)
Iteration 4: log likelihood = -6299.4588 (not concave)
Iteration 5: log likelihood = -5876.7425 (not concave)
Iteration 6: log likelihood = -5532.7846 (not concave)
Iteration 7: log likelihood = -5161.5731 (not concave)
Iteration 8: log likelihood = -4819.6921 (not concave)
Iteration 9: log likelihood = -4456.9828 (not concave)
Iteration 10: log likelihood = -4116.0767 (not concave)
Iteration 11: log likelihood = -3760.8316 (not concave)
Iteration 12: log likelihood = -3423.1071 (not concave)
Iteration 13: log likelihood = -3079.0232 (not concave)
Iteration 14: log likelihood = -2754.3068 (not concave)
Iteration 15: log likelihood = -2433.8964 (not concave)
Iteration 16: log likelihood = -2161.1081 (not concave)
Iteration 17: log likelihood = -1892.6441 (not concave)
Iteration 18: log likelihood = -1713.5194
Iteration 19: log likelihood = -1476.0321
Iteration 20: log likelihood = -1431.6649
Iteration 21: log likelihood = -1429.804
Iteration 22: log likelihood = -1429.8037
Iteration 23: log likelihood = -1429.8037
Number of obs = 1000
Wald chi2(1) = 3.262e+08
Log likelihood = -1429.8037 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
y | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mu |
x | 2.00003 .0001107 18060.39 0.000 1.999813 2.000247
_cons | 5.006732 .0639845 78.25 0.000 4.881325 5.13214
-------------+----------------------------------------------------------------
sigma |
_cons | 1.010924 .022605 44.72 0.000 .9666195 1.055229
------------------------------------------------------------------------------
.
. log close
log: /Users/baum/doc/Courses 2005-2006/EC77101/771ml3.smcl
log type: smcl
closed on: 20 Mar 2006, 14:35:38
-------------------------------------------------------------------------------