[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Declaring Time Series Problems
I am having a lot of difficulty declaring my monthly dataset to be time series
(specifically a panel). I also have an annual time series that I declared
without a problem.
The annual data looks something like this
2 1962 etc...
tsset countrycode year, yearly
and it worked fine
But my monthly data:
2 1960.03 etc...
I have been able to convert it to string , take a substring and create a
variable called paneldate by doing the following:
generate year = real(substr(date,1,4))
generate month = real(substr(date,6,2))
generate paneldate = ym(year,month)
format paneldate %tm
So my data now looks like this:
2 1960m3 etc.. (It shows up in the editor as 1960m1, but its value
When I try to:
tsset c_code paneldate, monthly
I continue getting an error message saying "repeated time values within panel".
I can't seem to figure this out. Other than the fact that it is monthly data,
it looks exactly like my annual data that was successful.
Any help would be appreciated,
* For searches and help try: