Statalist The Stata Listserver


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

RE: st: How can I filter the results with FE regression?


From   "Maarten Buis" <M.Buis@fsw.vu.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: How can I filter the results with FE regression?
Date   Tue, 25 Apr 2006 11:07:44 +0200

Ilker:
Standard significance levels no longer hold if you perform many
tests. If you do enough tests you are sure to find something 
even if nothing is there. Ways to deal with this is to apply a
Bonferroni correction, you divide the significance level by the
number of tests. Say you do 1000 tests than your significance 
level is .05/1000=.00005. Other slightly less conservative
corrections exist. have a look at -help _mtest-.
HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Ulrich Kohler
Sent: dinsdag 25 april 2006 8:50
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: How can I filter the results with FE regression?

Ilker Kaya asked:
> > I am currently running thousands of fixed effect regressions with panel
> > data time series but the independent variable I am interested in is same
> > across all regressions. Right now I am manually reviewing all results
> > and trying to get the significant ones at alpha= 0.05 level. This
> > process is taking a lot of time so is there any way to report only the
> > results that satisfy this significance level only for that variable? For
> > example I have 20 independent variables (1 to 20) and I am running all
> > possible combinations but I only care about variable 4. How can I only
> > see the results that variable 4 are significant in?  I would really
> > appreciate any help on this problem. Thanks in advance....
> >
> > Ilker Kaya

I would propose to display or collect the coefficients in a loop.

Here is a starter for the display approach:

---------------------
forvalues i=1/1000 {
        quietly xtreg depvar indep1 indep2 indep3 indep4 if xyz == `i'
        display _b[indep4] " " _se[indep4]  " " _b[indep4]/_se[indep4] <= 1.96
}
-----------------------

This displays the coefficient of independent variable 4, along with its
standard error and a 0 or 1 depending on whether the coefficient is
significant or not.

Here is a starter for the collect approach:

-----------------
postfile coefs i b se t using results
forvalues i=1/1000 {
        quietly xtreg depvar indep1 indep2 indep3 indep4 if xyz == `i'
        post coefs (`i') (_b[indep4]) (_se[indep]) (_b[indep4]/_se[indep4])
}
postclose coefs
-----------------

This saves the coefficients in questions, their standard errors and their
t-value in the Stata file "results.dta". You can open this file with -use
results, clear- and do what ever you like.

The major problem will be to set up the loop for the 1000 regressions. We need
more information to help you with that. Please do carefully read the help on
-foreach- and -forvalues-. In addition you might profit from reading "Cox,
N.J. Speaking Stata: How to face lists with fortitude. The Stata Journal ,
2002, 2, 202-222 ". There is also a section on -foreach- and -forvalues- in
the book  "Data Analysis Using Stata", written by Frauke Kreuter and myself,
which is available at the Stata bookstore.

Uli

--
kohler@wz-berlin.de
+49 (030) 25491-361
*
*   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/



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