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

Re: st: Dummy variables for pooled regressions


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: Dummy variables for pooled regressions
Date   Wed, 11 Jan 2006 13:55:07 -0500

The -egen group- suggestion will provide for fully interacted effects, but I think that just the main effects are wanted (unless I am guessing wrong about the somewhat hazy intention). The only way I know of doing this is to allow areg or xtref, fe to absorb one of the variables and to add dummies for the other (e.g., using xi).

Michael Blasnik
[email protected]


----- Original Message ----- From: "austin nichols" <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 11, 2006 11:26 AM
Subject: Re: st: Dummy variables for pooled regressions



. egen g=group(state ind)
. areg y x, absorb(g)

On 1/11/06, Yvonne Capstick <[email protected]> wrote:
Hi,

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?

Thanks!
Yvonne
*
*   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