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
xtabond time dummiesHi all, it's my first time using xtabond, so I would like to run this by folks who are familiar with…
Multiple observations per id, select id with highest value in other identifier and select corresponding other variables to that identifierDear statalists, I have a question with regard to organizing the data from long to wide and removin…
SEM and lincom with categorical variablesHello, I collected data on BMI and social support at 3 time points (all continuous variables). I al…
Data ProcessingHello Everybody , I'm a new Stata user. So, I would like to know how can I shift columns, then add…
Fuzzy merge on several numeric variablesI'm merging two lists of schools. The matches are not exact. For example, in one dataset a school ma…
Subscribe to:
Post Comments (Atom)
0 Response to Generating dates
Post a Comment