Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: xtreg individual and year fixed effects


From   daniele curzi <dancurzi@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: xtreg individual and year fixed effects
Date   Thu, 29 Mar 2012 18:29:39 +0200

Dear Statalist

I have a panel setted as follows iis  id (country-product dummy) tis year

I have more than 2000 country product different observations in the id
and 15 years

I need to estimate the country-product fixed effect and the year fixed
effect because I want to generate a new variable that is the sum of
the country-product fixed effect  the year fixed effect  the residual
of the regression

How can I estimate the country-product fixed effect and the time fixed effect

This is what I tryed to do

iis id
tis year

xtreg y x1 x2 dy, i(id) fe   where dy are the year dummies

predict mi = u

replace mi = mi + _b(_cons)

In this way I suppose to estimate the country-product fixed effect. If
This is true how can I obtain now the year fixed effects

Thank you very much

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index