vendredi 18 août 2017

convert math equations into code with ifelse and min/max

For a medical study I would like to calculate the eGFR, a measure of renal function, with an equation that require certain input values: Scr (serum creatinine), ScysC (serum cystatin C), age and sex-depending values, which are all available in my dataset.

Please see the attached image for the equations. eGFR equation

So I am mainly struggling with ifelse-statements and the min/max numbers. How do I create a code to retrieve the output with this equation?

My first thought is to create a loop function, but I don't know exactly how. So any help and time is very much appreciated :)

Aucun commentaire:

Enregistrer un commentaire