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

Re: st: RE: Declaring time series


From   [email protected]
To   [email protected]
Subject   Re: st: RE: Declaring time series
Date   Thu, 13 May 2004 10:01:57 -0500

Here is what I tried to do:
I had the data originally like this:
1960.01
1960.02

So:
generate year = real(substr(date,1,4))
generate month = real(substr(date,6,2))
generate paneldate = ym(year,month)
format paneldate %tm

When I tried to:
tsset c_code (my panel data operator) paneldate, monthly

It claims error 451, repeated time values within panel.

I apologize for not making it clear.  Maybe you can tell me where I'm going
wrong with this info.

Justin



Quoting Nick Cox <[email protected]>:

> You should say exactly what you type. 
> 
> Among other things, it is possible that you are 
> not declaring the panel variable to -tsset-. 
> 
> As with monthly data 1960m1 is 1, etc. (see 
> Stata documentation), much of what you say 
> sounds what would be expected. 
> 
> Nick 
> [email protected] 
> 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of 
> > [email protected]
> > Sent: 13 May 2004 15:35
> > To: [email protected]
> > Subject: st: Declaring time series
> > 
> > 
> > I am having a lot of difficulty trying to declare my panel 
> > data as time series. 
> > I tried creating a variable that is listed in the dataset as 
> > 1960m1, 1960m2,
> > etc, and it seems to be encoded (the value when in data 
> > editor is 0,1,2,etc). 
> > But when I try to declare it, it returns an error message 451 
> > "repeated values
> > within panel".  So I entered a new variable with values 0 
> > through 516 for each
> > country in panel, and tried to declare that as a time series 
> > and it returns the
> > same error message 451, saying "repeated values within sample".
> > 
> 
> *
> *   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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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