Statalist


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

Re: st: replace var with if range condition


From   "Michael S. Hanson" <mshanson@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: replace var with if range condition
Date   Wed, 22 Aug 2007 13:05:37 -0400

On Aug 22, 2007, at 12:23 PM, Ziad El-Khatib wrote:

Any tips how to write condition replace to make condition in case of range?
Example:
variable name is age

gen age1 = 0
replace age1 = 1 if age is between 20 and 24 ?
	-help inrange-

                                        -- Mike

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