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

st: Observation variable transformation

From   "kelly johnson" <>
Subject   st: Observation variable transformation
Date   Sat, 10 Sep 2005 13:14:34 -0400


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.

Thank you!


Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ Security.

* For searches and help try:

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