Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Generating variables


From   "Mentzakis, Emmanouil" <[email protected]>
To   <[email protected]>
Subject   RE: st: Generating variables
Date   Wed, 7 Mar 2007 14:06:00 -0000

Thank you very much Phiipp. 

All good now.

Cheers
Manos 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Philipp Rehm
Sent: 07 March 2007 14:03
To: [email protected]
Subject: Re: st: Generating variables

clear
set obs 10
gen X=_n
list

HTH,
Philipp

Mentzakis, Emmanouil wrote:
> Dear all,
> 
> I would like to create a variable that goes from 1 to 10 with step of 
> one (e.g. like the one below).
> 
> X
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 
> I have tried:
> egen x=seq(), f(1) t(20) b(1)
> 
> But it returns an empty variable. 
> 
> Could you please make any suggestions?
> 
> Best Regards,
> Manos
> 
> *
> *   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