Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: maximum likelihood estimation similar to Poi 2002


From   "Brian P. Poi" <[email protected]>
To   [email protected]
Subject   Re: st: maximum likelihood estimation similar to Poi 2002
Date   Mon, 28 Mar 2011 08:00:14 -0400


On 3/27/2011 10:51 PM, Alex Olssen wrote:
Dear Statalist,

I am trying to manually estimate a system similar to the QUAIDS system
estimated in Poi's article in The Stata Journal, 2002, 2 (4).

A crucial difference is that I do not what to impose symmetry on my
coefficients like Poi did.

However my code doesn't seem to quite work.  I have fixed a couple of
problems but now when I try the command

ml search

I get the error

"b not found"

I suspected I had not put `' around a local somewhere but have checked
several times for this.


The easiest way to find problems like this is to turn on -ml trace- before calling -ml maximize-:

   . ml model ...
   . ml trace on
   . ml maximize

-ml trace- is like -set trace-, except it only shows a trace of your likelihood evaluator and not everything that -ml- does behind the scenes.

I was wondering if anybody would be interested enough to quickly look
through my code - altogether it is less than 80 lines long and this
includes spacing and comments for readability.
It makes a call to the program vec_sum.ado which was written by Poi
and can be accessed through the command

net sj 2-4
net install st0029

Finally, I am aware that in The Stata Journal, 2008, 8 (4), that Poi
provided another way to estimate QUAIDS using nlsur.

However I am particularly interested in the log-likelihood value
associated with my estimation and do not know of away to recover it
following nlsur.


-nlsur- with the "ifgnls" option stores the log-likelihood in e(ll). Just type in

   . display e(ll)

after -nlsur- to see it. If the only twist on your model is that you don't impose symmetry, -nlsur- can handle it. The -ml- version is of course fine, it's just much slower for this type of problem.

   -- Brian Poi
   -- [email protected]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index