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

Re: st: Dummy variables for pooled regressions


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Dummy variables for pooled regressions
Date   Wed, 11 Jan 2006 07:11:33 -0000 (GMT)

Yvonne Capstick wrote:

> I'm trying to run a regression of company profit on many potential
> determinants (e.g. past advertising, past sales growth). I have a large
> dataset of many companies and am doing a pooled regression, pooling all of
> the observations together. I would like to include two dummy variables as
> controls: one for the state, and a second for the industry (i.e. state and
> industry year fixed effects).
>
> Is there a simple way to do this without literally creating a separate
> dummy variable for each state and each industry? I know that with a panel
> dataset (i.e. multiple cross sections over time), I can do xtreg y x,   
 > i(industry) fe if I am only interested in constructing an industry
fixed
> effect. This syntax instructs Stata to create the dummy variables so I
do > not have to.
>
> However, if I need more than one fixed effect (industry and state), xtreg
> cannot seem to accommodate this. It only lets me put one variable in the
> i() option. Could anyone suggest an alternative way?

Unforutnately, as Maggie Thatcher once famously said, there is no
alternative. There is no sensible way that I can think of to make more
than one fixed effect be included in the -i()- option in -xtreg, fe-. I
suspect it is because this would, in effect, require the generation of
lots of interactions between the two fixed effects in question (here,
company*year), but I cfould be wrong.

If you're concerned about parsimony, how about using a time-trend in place
of lots of year dummy variables whilst placing your industry sector
variable as the fixed effect? For example:

. clear

. webuse grunfeld

. tsset company year
       panel variable:  company, 1 to 10
        time variable:  year, 1935 to 1954

. xtreg mvalue invest kstock time, i(company) fe

Fixed-effects (within) regression             Number of obs      =       200
Group variable (i): company                   Number of groups   =        10

R-sq:  within  = 0.4235                       Obs per group: min =        20
       between = 0.7812                                      avg =      20.0
       overall = 0.7170                                      max =        20

                                              F(3,187)           =     45.80
corr(u_i, Xb)  = 0.6650                       Prob > F           =    0.0000
----------------------------------------------------------------------------
    mvalue |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
    invest |   2.963813   .3101164     9.56   0.000     2.352037    3.575589
    kstock |  -.6908516   .1676976    -4.12   0.000    -1.021674   -.3600293
      time |   8.694798   4.435446     1.96   0.051    -.0551443    17.44474
     _cons |   748.4796   43.20747    17.32   0.000     663.2429    833.7163
-----------+----------------------------------------------------------------
   sigma_u |  914.76264
   sigma_e |  266.72427
       rho |  .92164414   (fraction of variance due to u_i)
----------------------------------------------------------------------------
F test that all u_i=0:   F(9, 187) =   111.72              Prob > F = 0.0000

Notice that the parameter estimates and standard errors here are exactly
the same as they would be if we were to run

. xi: reg mvalue invest kstock time i.company

with, of course, lots more variables in the model, so you should be quids
in with this approach, as we would say in Blighty. However, if you believe
it is imperative to measure individual year-by-year effects in your model,
you have no alternative but to include lots of year dummies.

I hope this helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

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