Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: Problems with -hetgrot-


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: Problems with -hetgrot-
Date   Sun, 14 Mar 2004 18:14:12 -0600

----- Original Message ----- 
From: "Richard Williams" <[email protected]>
To: <[email protected]>
Sent: Sunday, March 14, 2004 5:41 PM
Subject: Re: st: Re: Problems with -hetgrot-


> At 04:13 PM 3/14/2004 -0600, Scott Merryman wrote:
> >No doubt there are more efficient ways to do this, but here is an
> >implementation
> >that seems to work.
>
> I created my own variation called -hetgrot2-.  The good news is that both
> my -hetgrot2 and Scott's -gwhet2- seem to give identical results.  The bad
> news is that neither exactly matches the results reported by Greene!  But
> they come very close, and I'm not 100% sure Greene is doing it right.
>
> Greene, 4th edition, table 15.1, p. 598 presents an example (and the data
> are included on a CD with the book).  Estimates are presented for OLS,
> FGLS, and ML.  I found that the following Stata commands perfectly
> reproduce the parameter estimates he reports.  The LR statistic for
> groupwise heteroscedasticity he reports is 120.915, which he says is based
> on the ML statistics.  I'm editing the output to just get the most crucial
> parts.
>
> . use "W:\Greene 4th edition\DATAFILE\STATA\TBL15_1.DTA", clear
> . tsset firm year
>         panel variable:  firm, 1 to 5
>          time variable:  year, 1935 to 1954
> . * Model 1: Least Squares
> . quietly xtgls  i f c
> . gwhet2
>
> chi2 (4)  =      104.41
>
> . * Model 2: FGLS
> . quietly xtgls  i f c, p(h)
> . gwhet2
>
> chi2 (4)  =      114.31
>
> . * Model 3: ML
> . quietly xtgls  i f c, p(h) igls
> . gwhet2
>
> chi2 (4)  =      122.89
>
> The final LR statistic of 122.89 is close but not quite to Greene's
> reported statistic of 120.915.  I believe the discrepancy is due to the
> fact that Greene uses the estimate of sigma from Model 1 (Least Squares)
> while also using the estimates of the group sigmas from Model 3 (ML).  I'm
> not sure I understand the logic of this, but his Limdep program apparently
> does it this way too.
>
> So the moral is, if you have a mad desire to use this test and you are
> using xtgls then (1) don't use the original hetgrot, as it does it wrong,
> and (2) you seem to come closest to Greene if you include the -p(h)- and
> -igls- parameters on the -xtgls- command, and (3) if you wanted to do
> things exactly like Greene, I think you would need a program that estimated
> both models 1 and 3.  From 1 you would save the OLS estimate of sigma, and
> from 3 you would save the group sigmas, and then compute the test
> statistic.  (But again, I am not sure Greene is doing it right; at the very
> least, his formulas seems internally inconsistent.)
>
> If your life really depends on getting these statistics right, you also may
> just want to use Limdep, as these tests and the others Greene presents are
> easily implemented with Limdep's TSCS (Time Series/Cross Section)command.
>
>

Richard,

I believe there is an error in Greene's text.  As you reported, Greene gives the
LR statistics as 120.915.  However, if you compute this by hand, given the
individual sigma^2, the result is:

. disp 100*ln(15708.84) - 20*(ln(9410.91) + ln(755.85) + ln(34288.49) +
ln(633.42) + ln(33455.51))
104.41512

which is what you and I got.

I did check the "Edition 4 Errata"
(http://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm) and this is
not listed, though it does state that for the equation on 599 the two
occurrences of "log" should be "ln."

Scott

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index