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
Related Posts with Help with new variable generation
Help with one step system gmmHello, my case is described below and I would like help on how should I run One step system GMM usin…
Problem with calculating employment (unemployment) duration until first unemployment (employment)Hello everyone, I have trouble working with duration data. I am working with spell-type data. The …
Multiple-answer questions: When to reduce multivariate to univariate probit?Problem description Assume there are individuals j who each need to choose from two alternatives i=…
Average values of dependent variableHi everyone, I have one question which is a little bit harder to explain but I will give my best. …
interpreting categorical odds ratiosI ran a logistic regression to look at the difference of an outcome ( low birth weight infant) among…
Subscribe to:
Post Comments (Atom)
0 Response to Help with new variable generation
Post a Comment