Hi!
I'm trying to use this formula to calculate eGFR: eGFR = 142*min(standardized Scr/K, 1)^α *max(standardized Scr/K, 1)^-1.200 *0.9938Age *1.012 [if female]
Scr= creatinine, e.g. creatinine=2.4.
In this formula, the min(standardized Scr/K, 1) means that you either choose the creatinine value divided by kappa, OR 1. The same goes for the max-one.
I'm looking for advice on how to write the command so Stata realizes this. Grateful for any help!
Related Posts with Writing a formula in which stata chooses a value or 1
Invalid name error in foreach loopHi, Same title as a similar post from 2020 which did not answer my problem... I am trying to run a…
Foreach loop - skip no observationsHello, I've been reading the posts on related questions on the forum but I am still somewhat stuck …
Create 50 .dat-files from stata after imputationI'm wondering if someone can help me with creating .dat-files from a stata dataset after I applied d…
ivreg2 with interaction termsHello, I am trying to understand how to make a 2SLS with ivreg2 when there are interaction terms. I…
After frlink, can we check which observation in frame2 didn't matach in frame1?After frlink, can we check which observation in frame2 didn't match in frame1? If we use two dataset…
Subscribe to:
Post Comments (Atom)
0 Response to Writing a formula in which stata chooses a value or 1
Post a Comment