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

Re: st: Generate variable

From   Richard Williams <>
Subject   Re: st: Generate variable
Date   Sun, 08 May 2005 21:03:29 -0500

At 09:46 PM 5/8/2005 -0400, you wrote:

A few quick questions:

(1) How do I generate a new variable in a dataset that is equal to the observations number? eg. suppose have data like:
gen id = _n

(3) also, can you refere me to a good site where i can get more information on writing loops?
Here is one good FAQ:

*   For searches and help try:

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