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 on April 23, and its replacement, statalist.org is already up and running.


[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 <engels.ba@gmail.com>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index