Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: xtreg individual and year fixed effects


From   daniele curzi <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index