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

st: replace var with if range condition

From   "Ziad El-Khatib" <>
Subject   st: replace var with if range condition
Date   Wed, 22 Aug 2007 09:23:53 -0700

Dear StataLister,
Any tips how to write condition replace to make condition in case of range?
variable name is age

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

Thank you in advance and best regards

Ziad El-Khatib
National Institute for Communicable Diseases (NICD)
1 Modderfontein Road
Private Bag X4, Sandringham, 2131
Johannesburg, South Africa

Division of International Health (IHCAR)
Karolinska Institutet
Stockholm, Sweden
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index