[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Dummy variables for pooled regressions
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).
----- Original Message -----
From: "austin nichols" <firstname.lastname@example.org>
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@example.com> 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
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
industry year fixed effects).
Is there a simple way to do this without literally creating a separate
variable for each state and each industry? I know that with a panel
(i.e. multiple cross sections over time), I can do xtreg y x, i(industry)
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
) option. Could anyone suggest an alternative way?
* For searches and help try: