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

st: RE: how to generate a variable as follow


From   "FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: how to generate a variable as follow
Date   Tue, 6 Jan 2004 11:41:10 -0600

Here's one way:

gen x=1+mod(_n-1,6)

Al Feiveson

-----Original Message-----
From: rghuang [mailto:[email protected]]
Sent: Tuesday, January 06, 2004 11:32 AM
To: [email protected]
Subject: st: how to generate a variable as follow


x
1
2
3
4
5
6
1
2
3
4
5
6
1
2
3
4
5
6

how can i get it.thank you!

*
*   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/
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index