Hi, I have observations with a start date and an end date (e.g. 04/31/1997 and 02/19/2002) and I want to create a dummy variable for each year (and fraction thereof) between each observations start and end date. In practice, I also want the year to begin on April 1st rather than Jan 1st.
For example, converting the above dates into dummy variables indicated with ‘1’ for 1997,1998,1999,2000,2001 and ‘0’ for other years in the dataset - note that 2002 isn't include because it doesn't include my start of the year = April 1st). Does that makes sense? Any ideas on how I could code this/
Cheers
Related Posts with Converting a start and end date (a timeframe) into several annual time dummies
Merging panel dataHi there, I have panel data with each survey providing multiple STATA datasets from that sweep. Eac…
Unit root in panel dataDear Statalist, Question: if I have a number of variables and only some of them contain unit root …
graph editor vs commandhi together i have following graph by command a b c d e 96 16 43 34 16 graph hbar (sum) a b c…
Use Asrol and natural Log.Hi, I asked this question yesterday but it was not mentioned in the title so I followed the advice …
IV Regression with fixed effects an three instrementsHello all, i am currently trying to run an iv regression with fixed effects. I need to instrument e…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a start and end date (a timeframe) into several annual time dummies
Post a Comment