Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten buis <maartenbuis@yahoo.co.uk> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: year-fixed effects in monthly panel |
Date | Fri, 11 Feb 2011 14:03:21 +0000 (GMT) |
--- On Fri, 11/2/11, Abhimanyu Arora wrote: > Is there any option in the -xt- commands that could allow > me to control for year in a panel with month as the time > unit? You just make a variable that represents the year and use that in your favourite -xt- command. Assuming your time variable is called time and is stored as %tm (see -help dates and times-) you can create that year variable as folows: gen year = year(dofm(time)) Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl ------------------------- * * 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/