Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Stas Kolenikov <skolenik@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: xtlogit stata option: tech(bhhh) vce(opg) |

Date |
Wed, 17 Mar 2010 14:30:37 -0500 |

Whoa. Take that slow. Stata's code has been tested, verified and scrutinized by generations of users. Any modifications you could do on the existing code will be on your own risk. And you do need to get that book on ML estimation to read about different implementations of it in Stata. -d2- is not an option, this is a method to compute the maximum likelihood estimates (and associated derivatives). Sorry, I won't bother explaining that, as it is done better in the book. I posted the code that produced the error. If your installation of Stata produces something else, you might have an older version with different settings. If your Hessian is not negative definite, you are probably away from the maximum and need to find different starting values. You might also want to specify -difficult- option for the ML optimizer to do a more thorough job in stepping through the parameter space. On Wed, Mar 17, 2010 at 11:57 AM, Yu Xue <snowrain@gmail.com> wrote: > Hi Stas, > Thanks for your reply ! > 1. Actually, I was wondering how you got that error info, > "type d2 evaluators are not allowed with technique bhhh > r(111);" > > I tried the same thing, and the error info I got was, > "bhhh requires observation level scores > r(504);" > > Did you delete some code that produced that error info ? How did you > choose to use "d2"? I am sorry but I did not see the option "d2" with > "xtlogit". Can you please let me know how to find it ? Thank! > > 2. The reason why I wanted to use BHHH was because when I used > "xtlogit" to converge my model, stata did not give me any lnL value, > and showed the error info "Hessian is not negative semi-definite" > after the second iteration. So, I wonder if I will have to use "ml" > programming to code Hessian to be negative definite. Thanks for > letting me know about stata .ado file. I forgot to check them. I > checked just now and I found several .ado files that can be useful. I > may only need to do some changes in stata .ado file. Thanks! > > Best, > Yu > > > On Wed, Mar 17, 2010 at 12:11 AM, Stas Kolenikov <skolenik@gmail.com> wrote: >> In -d2- method, there is a single value of the likelihood produced, >> the vector of analytical derivatives coded, and the Hessian matrix >> coded as well, all by Stata developers. You don't need to do this kind >> of work. My guess is that all the panel methods are implemented that >> way. The implementation of BHHH implies an observation-level >> contributions to the likelihood, scores and Hessian, which simply does >> not work that way with panel data: the contributions are from the >> panels. >> >> Why do you insist on BHHH for this model? >> >> On Tue, Mar 16, 2010 at 9:19 PM, Yu Xue <snowrain@gmail.com> wrote: >>> Hi Stas, >>> Thanks for answering my question. I guess I will have to code gradient >>> in order to use bhhh, or code Hessian and jump over when it is not >>> negative definite. >>> Thanks! >>> >>> Best, >>> Yu >>> >>> On Tue, Mar 16, 2010 at 7:58 PM, Stas Kolenikov <skolenik@gmail.com> wrote: >>>> On Tue, Mar 16, 2010 at 3:41 PM, Yu Xue <snowrain@gmail.com> wrote: >>>>> Hello all, >>>>> I have a confusion about stata maximization options, in particular >>>>> "tech()" and "vce()" when using "xtlogit". >>>>> >>>>> I am using xtlogit, and I see the maximization technique option has >>>>> "bhhh". BHHH uses outer product gradients (opg) to estimate covariance >>>>> matrix instead of using Hessian matrix. But "opg" is not an option for >>>>> "vce(vcetype)". Are they contradictory/inconsistent ? >>>>> So, is "bhhh" really an option in stata if I use "xtlogit" without >>>>> coding gradient myself or not ? I think in order to use "opg" I have >>>>> to code analytic gradient. But how come that "bhhh" is an option for >>>>> "tech"? >>>> >>>> . webuse union >>>> (NLS Women 14-24 in 1968) >>>> >>>> . xtlogit union south black, tech(bhhh) >>>> >>>> < output omitted > >>>> >>>> type d2 evaluators are not allowed with technique bhhh >>>> r(111); >>>> >>>> So technique( bhhh ) is not really supported for this model. >>>> >>>> -- >>>> Stas Kolenikov, also found at http://stas.kolenikov.name >>>> Small print: I use this email account for mailing lists only. >>>> * >>>> * 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/ >>>> >>> >>> * >>> * 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/ >>> >> >> >> >> -- >> Stas Kolenikov, also found at http://stas.kolenikov.name >> Small print: I use this email account for mailing lists only. >> >> * >> * 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/ >> > > * > * 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/ > -- Stas Kolenikov, also found at http://stas.kolenikov.name Small print: I use this email account for mailing lists only. * * 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/

**Follow-Ups**:**Re: st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Yu Xue <snowrain@gmail.com>

**References**:**st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Yu Xue <snowrain@gmail.com>

**Re: st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Stas Kolenikov <skolenik@gmail.com>

**Re: st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Yu Xue <snowrain@gmail.com>

**Re: st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Stas Kolenikov <skolenik@gmail.com>

**Re: st: xtlogit stata option: tech(bhhh) vce(opg)***From:*Yu Xue <snowrain@gmail.com>

- Prev by Date:
**st: RE: RE: RE: RE: How to do bootstrap of candisc** - Next by Date:
**RE: st: is gllamm appropriate? is it necessary?-more information** - Previous by thread:
**Re: st: xtlogit stata option: tech(bhhh) vce(opg)** - Next by thread:
**Re: st: xtlogit stata option: tech(bhhh) vce(opg)** - Index(es):