Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: tsset woes

From   "Thuy Le" <>
To   <>
Subject   st: RE: tsset woes
Date   Sun, 27 Jun 2004 10:12:00 -0400

Dear all,

Thank Prof. Baum for the reply. I will try your suggestion.

I was able to get around the problem with some experiments. What I found is
that EViews recorded date as "01 Dec 90" and STATA reads that as the number
of days elasped from 01/01/1960. Even when you format it, the internal date
is the same, and when you -tsset- to monthly, there are gaps between dates.
What you need to do is to convert to the number of months from Jan/1960, not
the number of days.

Here is what I did by point-and-click:

1/ Use -format date %dm/cy- to display "date" as "Dec/1990" then copy and
paste into a new_var. This will copy only the string label and the old
variable name "date" as the obs #1, so I had to delete this obs.
2/ Use 	-generate month = monthly(new_var, "my")- /* This will convert the
string to number of months sind Jan/60.
		-tsset new_var, monthly

That will do the job, but it takes a lot of step and not as clear cut as
Eviews in handling time.

Best regards,

Ky Tran

-----Original Message-----
[]On Behalf Of Christopher
Sent: Sunday, June 27, 2004 6:42 AM
Subject: st: tsset woes

Ky Tran wrote

I moved my data from Eviews to STATA and I am having difficulty in -tsset-
the data. The variable "date" imported and displayed as "01 Dec 90". I use

.format date %dm/y

and the variable is now displayed as "Dec/90". However, when I -tsset- the
data using

.tsset date, monthly

STATA gives the message:

. tsset date, monthly
        time variable: date, 2901m1 to 3159m9, but with gaps

But there is no gap in my monthly series. I could not do -dfuller- on the
dataset, and the message is:

. dfuller m1
no observations

per my posting last week, suggest that you -findit tsmktim-

I read the help online and the time series manual but couldn't find any
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index