[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Dealing with dates
You could just extract the year and the month from these, like so:
(Supposing that your current date variable is called -date-)
generate year = real(substr(date,1,4))
generate month = real(substr(date,6,2))
generate paneldate = ym(year,month)
format paneldate %tm
-paneldate- is your new date formatted as a time-series variable that
you can use for panel regressions and time-series analysis.
Hope this helps.
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]
> Sent: Wednesday, May 12, 2004 12:47 PM
> To: email@example.com
> Subject: st: Dealing with dates
> I have a panel data set with countries and years in rows. I
> can't declare my
> set to be time series because my dates have decimal points.
> Country1 1960.01
> Country1 1960.02
> COuntry2 1960.01
> How do I get these into workable form for time series analysis?
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
* For searches and help try: