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

Re: st: fixed effects & autoco& heterosk&matsize


From   Mark Schaffer <[email protected]>
To   [email protected], Svetlana Mira <[email protected]>
Subject   Re: st: fixed effects & autoco& heterosk&matsize
Date   Wed, 26 May 2004 00:05:31 +0100 (BST)

Svetlana,

Quoting Svetlana Mira  <[email protected]>:

> I've got exactly the same problem as Toni, but for a very large
> dataset (44 th obs over 13 years). 
> I've evaluated my model based on fixed/random effects models.
> According to Hausman test fixed 
> effects model is the most appropriate. I have used xttest3 to test
> for heterosk; xtserial  and pantest2 to 
> test for autocorrelation for the fixed effects model. Based on the
> results, my model suffers from 
> both - autocorrelation and heteros. Following Clieve's advice I have
> used xtgls y x1 x2 x3, c(p) force
>  to cure for autocorr and heterosk. However, a message saying that
> "matsize too small - should be 
> at least 6243" has appeared. I have tried to increase the memory
> (set memory 700m) and matsize 
> (set matsize 4000) to the maximum (allowed by my computer), but it
> seems that it is not enough. 
> Any suggestions?

A simple and effective alternative is to estimate with fixed effects and 
cluster-robust standard errors.  The cluster option will give you standard 
errors that are robust to arbitrary within-group correlation as well as 
heteroskedasticity.  Arbitary within-group correlation includes 
autocorrelation of any form.

The only problem is that xtreg doesn't accept a cluster option.  However, 
areg will do fixed effects estimation, and does have a cluster option.  
So... if you estimate using areg and cluster, you will get the same fixed 
effects coefficients, but your standard errors will be robust to 
heteroskedasticity and arbitrary autocorrelation, and this may be good 
enough for your purposes.

BTW, one reason this works for you is because you have a large-N panel, 
i.e., the number of clusters is large.  For the asymptotics behind the 
cluster option to work, the number of clusters needs to go off to 
infinity, and 44k is not a bad step towards getting there.  I keep seeing 
regressions reported in papers where people use the cluster option with 
tiny numbers of clusters - today I saw one where the number of clusters 
was 6 (!!).

Hope this helps.

--Mark

> 
> Svetlana Mira
> 
> 
> On 26 May 2004 at 0:20, Antonio Rodrigues Andres wrote:
> 
> > Thanks Clive
> > I just wonder if I want to estimate a fixed effects model with
> ar(1) and
> > accounting for heteroskedasticity, I should use xtgls as follows
> > 
> > xtgls dep.var indep.var indi.dummies, force p(corr)
> > 
> > is that correct?
> > Toni
> > 
> > >>> [email protected] 05/25/04 11:57 PM >>>
> > Antonio Rodrigues Andres wrote:
> > 
> > > I tried
> > > xtgls y x1 x2 x3, force p(corr)
> > > but it appears the message
> > > panels must be balanced
> > >
> > > what is wrong?
> > 
> > Try:
> > 
> > . xtgls y x1 x2 x3, c(p) force
> > 
> > CLIVE NICHOLAS        |t: 0(044)191 222 5969
> > Politics              |e: [email protected]
> > Newcastle University  |http://www.ncl.ac.uk/geps
> > *
> > *   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/
> > 
> > *
> > *   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/
> 
> 
> *
> *   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/
> 



Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3008
email: [email protected]
web: http://www.sml.hw.ac.uk/ecomes
________________________________________________________________

DISCLAIMER:

This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
________________________________________________________________
*
*   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