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

st: RE: Observation variable transformation


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Observation variable transformation
Date   Sun, 11 Sep 2005 16:13:38 +0100

Look at the help for -egen-, especially -egen, seq()-. 

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

kelly johnson

> I have created an observation variable X (e.g. gen X=_n) for 
> a large data 
> set. How can I create a new variable that is unique for successive 
> observations of 10 variables (i.e. i want this variable to be 
> equal to 1 in 
> obs 1-10, 2 in 11-20, and so forth)? There are way too many 
> obervations to write a simple -replace- command.

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