-----------------------------------------------------------------------------------------
       log:  /Users/baum/doc/Courses 2008-2009/EC771 S2009/771ml1.smcl
  log type:  smcl
 opened on:  28 Mar 2009, 11:00:54


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

program fishy1_lf version 10.1 args lnf theta quietly replace `lnf' = -`theta' + log(`theta')*$ML_y1 - lnfactorial($ML_y1) end

. . clear

. input y

y 1. 5 2. 0 3. 1 4. 1 5. 0 6. 3 7. 2 8. 3 9. 4 10. 1 11. end

. . ml model lf fishy1_lf (y=)

. . ml check

Test 1: Calling fishy1_lf to check if it computes log likelihood and does not alter coefficient vector... Passed.

Test 2: Calling fishy1_lf again to check if the same log likelihood value is returned... Passed.

------------------------------------------------------------------------------ The initial values are not feasible. This may be because the initial values have been chosen poorly or because there is an error in fishy1_lf and it always returns missing no matter what the parameter values.

Stata is going to use ml search to find a feasible set of initial values. If fishy1_lf is broken, this will not work and you will have to press Break to make ml search stop.

Searching... initial: log likelihood = -<inf> (could not be evaluated) searching for feasible values + feasible: log likelihood = -31.105155 improving initial values +.....+... improve: log likelihood = -18.391069 rescaling entire vector .. rescale: log likelihood = -18.391069

restarting tests... ------------------------------------------------------------------------------

Test 1: Calling fishy1_lf to check if it computes log likelihood and does not alter coefficient vector... Passed.

Test 2: Calling fishy1_lf again to check if the same log likelihood value is returned... Passed.

Test 3: Calling fishy1_lf to check if 1st derivatives are computed... test not relevant for method lf.

Test 4: Calling fishy1_lf again to check if the same 1st derivatives are returned... test not relevant for method lf.

Test 5: Calling fishy1_lf to check if 2nd derivatives are computed... test not relevant for method lf.

Test 6: Calling fishy1_lf again to check if the same 2nd derivatives are returned... test not relevant for method lf.

------------------------------------------------------------------------------ Searching for alternate values for the coefficient vector to verify that fishy1_lf returns different results when fed a different coefficient vector:

Searching... initial: log likelihood = -<inf> (could not be evaluated) searching for feasible values +

feasible: log likelihood = -19.151857 improving initial values ......+... improve: log likelihood = -18.441917

continuing with tests... ------------------------------------------------------------------------------

Test 7: Calling fishy1_lf to check log likelihood at the new values... Passed.

Test 8: Calling fishy1_lf requesting 1st derivatives at the new values... test not relevant for method lf.

Test 9: Calling fishy1_lf requesting 2nd derivatives at the new values... test not relevant for method lf.

------------------------------------------------------------------------------ fishy1_lf HAS PASSED ALL TESTS ------------------------------------------------------------------------------

Test 10: Does fishy1_lf produce unanticipated output? This is a minor issue. Stata has been running fishy1_lf with all output suppressed. This time Stata will not suppress the output. If you see any unanticipated output, you need to place quietly in front of some of the commands in fishy1_lf.

-------------------------------------------------------------- begin execution ---------------------------------------------------------------- end execution

. . ml maximize

initial: log likelihood = -18.441917 rescale: log likelihood = -18.441917 Iteration 0: log likelihood = -18.441917 Iteration 1: log likelihood = -18.379703 Iteration 2: log likelihood = -18.379268 Iteration 3: log likelihood = -18.379268

Number of obs = 10 Wald chi2(0) = . Log likelihood = -18.379268 Prob > chi2 = .

------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 2 .4472136 4.47 0.000 1.123477 2.876523 ------------------------------------------------------------------------------

. . test _cons = 1

( 1) [eq1]_cons = 1

chi2( 1) = 5.00 Prob > chi2 = 0.0253

. . log close log: /Users/baum/doc/Courses 2008-2009/EC771 S2009/771ml1.smcl log type: smcl closed on: 28 Mar 2009, 11:00:54 -----------------------------------------------------------------------------------------