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

st: RE: gen new variable


From   [email protected]
To   [email protected]
Subject   st: RE: gen new variable
Date   Mon, 21 Oct 2002 12:39:15 +0100

generate newvar = 2*x

> -----Original Message-----
> From:	Kompal Sinha [SMTP:[email protected]]
> Sent:	Monday, October 21, 2002 12:48 PM
> To:	[email protected]
> Subject:	st: gen new variable
> 
> Hi there,
> I want to generate a new variable based on a variable x. That is the new
> variable should have value 1 if x=2, value 6 if x=3 and so on. How do I
> proceed.
> Thanks
> kompal
> 
> *
> *   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