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

st: RE: replacing variables


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: RE: replacing variables
Date   Tue, 28 Jan 2003 15:42:26 -0500

> -----Original Message-----
> From: Jean Roth [mailto:[email protected]] 
> Sent: Tuesday, January 28, 2003 3:40 PM
> To: [email protected]
> Subject: st: replacing variables
> 
> 
> Is it possible to shorten the 'if' statement in the replace below
> and still retain the upper and lower bounds?
> 
> replace hsgrad = 1 if grade>=9 & grade<=12
> 

	replace hsgrad = 1 if inrange(grade,9,12)

Nick Winter

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