"Looks like" does not pin it down, but if they really are numeric
variables then
gen date = ym(YY, MM)
will work and if they really are string variables then
gen date = ym(real(YY), real(MM))
will work. You'd want to format that new variable e.g. minimally
format date %tm
Nick
On Tue, Feb 1, 2011 at 10:37 PM, Jung-eun Lee <tinymoon@yahoo.com> wrote:
> Hello,
> I need help with converting month and year variables into a date variable so that I can use it for a time-series analysis.
> Year variable: YY (looks like 1992, 1993, 1994...)
> Month variable: MM (looks like 1, 2, 3, 4...)
*
* 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/