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

st: RE: RE: how to generate a variable as follow


From   "Daniel" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: how to generate a variable as follow
Date   Tue, 6 Jan 2004 18:48:05 +0100

egen six=seq(), from(1) to(6)

Daniel


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)
> Sent: Tuesday, January 06, 2004 6:41 PM
> To: '[email protected]'
> Subject: st: RE: how to generate a variable as follow
>
>
> 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/
>
>



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