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

st: Cond() and if - Help

Subject   st: Cond() and if - Help
Date   Sat, 11 Aug 2007 04:18:06 -0300 (BRT)

Dear statalisters,

I would like to know whether there is a way to run the same analysis below
using one line only. If not, what would be the shorter way to do it?

I tried cond() but could not include all statements together.

replace var1 = 0 if var2<=var3&var4==1&var5==`i'
replace var1 = 1 if var2>var3&var2<=X&var4==1&var5==`i'
replace var1 = 2 if var2>X&var4==1&var5==`i'

Thank you for your time and help

all the best,


Tiago V. Pereira
Heart Institute - InCor
Laboratory of Genetics and Molecular Cardiology,
Department of Biochemistry and Molecular Biology,
Federal University of São Paulo.
Av. Dr. Eneas de Carvalho Aguiar, 44;
Cerqueira César - CEP 05403-000
Sao Paulo, SP Brazil.
Tel./fax: +55 11 3069 5068
*   For searches and help try:

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