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
AsdocHi, I am using asdoc to produce some mean difference tests (ttest). How can I change the names of t…
How can I install meta analysis package in my stata 17?Dear, professor, I want to install a meta-analysis package on my Stata 17. It shows like that. Runni…
Outreg2 and other issues with xtprobitHi all, I have a few questions regarding my code below: 1- Using Code: xtset dep time gives me th…
syntax: add a minus before a list of variablesDear Stata users, I want to make a convenient wrapper using gsort command. My question is how to ad…
How to convert a scalar value into a large matrixSay I have a value of 2 How can I convert this into say a [50,1] matrix such that it is the same si…
Subscribe to:
Post Comments (Atom)
0 Response to Generating dates
Post a Comment