Hi everyone,
Just wanted to know how to generate dates based on this data:
month1 | year1 | month2 | year2
Jan | 2008 | Feb | 2010
Jan | 2009 | Nov | 2012
Feb | 1990 | May | 2000
Mar | 1970 | dec | 1980
I want to create two new variables like these:
month1 | year1 | month2 | year2 | date1 | date2
Jan | 2008 | Feb | 2010 | jan2008 | feb2010
Jan | 2009 | Nov | 2012 | jan2009 | nov2012
Feb | 1990 | May | 2000 | feb1990 | may2000
Mar | 1970 | dec | 1980 | mar1970 | dec1980
The main idea is to create these variables in order to generate a new one with months worked, i.e. date1-date2.
Thanks!!
PD: I don´t know how to create the months-worked variable either, so if someone could tell me I would appreciate it
Related Posts with Generating dates
First Difference vs Fixed Effects Serial CorrelationHi, I am running the following regression: xtreg recycling loginc logpopden md11 md12 md13 md14 md…
file write local varname swim levelsof `varname',local(optionlist) *local row=`current_row' foreach item of l…
Multiple legends in combined subplots using the coefplot commandHello all. I am running a bunch of regressions, each with a different dependent variable using the s…
Averaging eclass commands across multiple modelsI am working with a data set that has five implicate data sets. For each data set, I am running a re…
Why do different fixed effects change some coefficients during robustness tests?Hello everybody, I am currently investigating the effects of a host country's domestic war on donor…
Subscribe to:
Post Comments (Atom)
0 Response to Generating dates
Post a Comment