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: xi i. year dummy in regression only for certain years
From
Barbara Engels <[email protected]>
To
[email protected]
Subject
st: xi i. year dummy in regression only for certain years
Date
Sat, 4 May 2013 13:46:32 +0200
Dear statalisters,
I have Stata 10.1 and want to perform a regression with automatically generated year dummies, i.e.
xi: reg dep indep i.year
but I want to conduct the regression only for a certain period of years, say 2007-2011,
while my dataset includes data from year 1910 onwards.
If I type
xi: reg dep indep i.year if (year>2006 & year<=2011),
Stata includes year dummies for the whole range of years 1910-2011.
However, I want only dummies for the years 2007-2011.
How can I do that?
Any help is greatly appreciated.
Cheers,
Barbara
*
* 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/