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: How to correctly code categorical variables effects in FE/RE model
From
Herman Haugland <[email protected]>
To
Statalist - Send questions <[email protected]>
Subject
st: How to correctly code categorical variables effects in FE/RE model
Date
Tue, 20 Aug 2013 15:18:44 +0200
Hi,
I would appreciate help with the following question:
How would you correctly code year effects in Stata?
Suppose I have a panel dataset with 5 individuals and and 32 quarters.
Meaning 8 years of data.
. xtset id quarters
Suppose that I want to test for the year effects in the regression.
I, so far, have been doing the following:
xtreg y x i.year, fe
But reading here (sorry for citing Wikipedia):
http://en.wikipedia.org/wiki/Categorical_variable#Effects_coding
It seems I am doing it the wrong way.
How would you correctly code categorical variables (year) effects in Stata?
Thanks for your consideration.
Med vennlig hilsen / Best regards,
Herman Haugland
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/