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" <>
To   <>
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. 


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.
> >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:

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