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]

Re: st: year-fixed effects in monthly panel


From   Maarten buis <[email protected]>
To   [email protected]
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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index