[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Richard Williams <Richard.A.Williams.5@nd.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: Problems with -hetgrot- |

Date |
Sun, 14 Mar 2004 18:41:53 -0500 |

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 implementationI 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.

that seems to work.

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 Williams, Notre Dame Dept of Sociology

OFFICE: (574)631-6668, (574)631-6463

FAX: (574)288-4373

HOME: (574)289-5227

EMAIL: Richard.A.Williams.5@ND.Edu

WWW (personal): http://www.nd.edu/~rwilliam

WWW (department): http://www.nd.edu/~soc

*

* 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/

**Follow-Ups**:**Re: st: Re: Problems with -hetgrot-***From:*"Scott Merryman" <smerryman@kc.rr.com>

**Re: st: Re: Problems with -hetgrot-***From:*"Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk>

**References**:**st: updates to -egenmore- on SSC***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**st: Problems with -hetgrot-***From:*"Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk>

**st: Re: Problems with -hetgrot-***From:*"Scott Merryman" <smerryman@kc.rr.com>

- Prev by Date:
**Re: st: can stata perform ridge regression** - Next by Date:
**Re: st: Re: Problems with -hetgrot-** - Previous by thread:
**st: Re: Problems with -hetgrot-** - Next by thread:
**Re: st: Re: Problems with -hetgrot-** - Index(es):

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