Hi, I`m trying to generate a new variable = different expressions by sex, but only if sex==0 the expression doesn`t work... Why?


gen GFR=.
if sex==0 replace GFR= [(140- ages)* wt]/(cr *72) /// it doesn`t work
if sex==1 replace GFR= [(140- ages)* wt]/(cr *72) * 0.85 //// ok

Thanks in advance