Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: r(451)


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: r(451)
Date   Mon, 20 Aug 2007 17:39:23 +0100

With this dataset, -n- is not a valid identifier. 
I don't know what it is, but 

. su n

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
           n |      1031    1.056002    1.341506  -2.263364   4.687321

shows that it's not acceptable as an identifier.

Your command 

. gen yr=y(1980)+_n-1,
options not allowed
r(101);

is failing because Stata sees the comma and -- as it is 
telling you -- options are not allowed with -generate-, but the command 
will fail anyway because y(1980) is not legal Stata. 

I don't know anything about this dataset, but my guess
is that -id- is a suitable identifier. 

Nick 
n.j.cox@durham.ac.uk 

Alan Williamson
 
> I use stata-press data of abdata to run xtabond. But I got 
> message like:
> 
> . use http://stata-press.com/data/r9/abdata
> 
> . tis year
> 
> . iis n
> 
> . tsset n year
> repeated time values within panel
> r(451);
> 
> . gen yr=y(1980)+_n-1,
> options not allowed
> r(101);
> 
> . gen yr=year
> 
> . tsset n yr
> repeated time values within panel
> r(451);
> 
> In this case,  are there any suggestions about how can I set 
> the tsset properly for n m ys etc. please?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index