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

RE: st: how to create case id number


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: how to create case id number
Date   Fri, 29 Apr 2005 17:26:46 +0100

Sorry that wasn't clear. I wrote: 

	_n remains defined as 1 to whatever is _N. 

Please read this as a range: 

	_n remains defined as 
		1 to whatever is _N. 

In American, 1 through whatever is _N. 
 
(British doesn't have this excellent idiom.)  

Or in a common notation

_n remains defined as 1,..., _N. 

There is no disagreement, just that my wording
evidently wasn't clear enough. 

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

Eric G. Wruck
 
> Hi Nick:
> 
> Could you please explain your second sentence below about _n 
> being defined as 1?  In my new Stata 9 User's Guide (which 
> arrived yesterday!) on page 148, I read
> 
> "_n contains the number of the current observation."
> 
> Adding to my earlier attempted explanation, I'll point out 
> that Stata refers to variables such as _n as system or 
> underscore variables.
> 
> EGW
>  
> 
> 
> >It is more the other way round. _n remains defined
> >as 1 to whatever is _N regardless of the sort order
> >of the data. Which observation is which is what varies.
> >The consequences are much the same, naturally.
> >
> >Adding or deleting observations will change the range
> >of _n, certainly.

*
*   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