need help in creating formula for CKD-EPI equationI created the one mentioned below, but is somehow erroneous.
141 * Choose(
(:Creat / :k) ^ If( :Sex == F/*###*/,
-0.329,
-0.411
) < 1,
1
) * Choose( (:Creat / :k) ^ (-1.209) > 1, 1 ) * 0.993
^ :Age * If( :Sex == F, 1.018, 1 ) *
If( :Race == B, 1.159, 1 )
Can someone please help me fix it?
Re: need help in creating formula for CKD-EPI equationIt's hard to tell without more context, especially the error message that you're receiving, but I think you probably need to put your sex and race constants in quotes in the comparisons.
141 * Choose(
(:Creat / :k) ^ If( :Sex == "F",
-0.329,
-0.411
) < 1,
1
) * Choose( (:Creat / :k) ^ (-1.209) > 1, 1 ) * 0.993
^ :Age * If( :Sex == "F", 1.018, 1 ) *
If( :Race == "B", 1.159, 1 )
Re: need help in creating formula for CKD-EPI equationI don't think you understand the Choose() function. It evaluates its first argument and uses it as an index (1, 2, ..., N) to the argument to evaluate and return. Your first call has only 2 arguments. Would you expect the first argument to evaluate to an integer value starting at 1?
What are you trying to calculate? Can you show an equation?
Re: need help in creating formula for CKD-EPI equationGFR = 141 × min(Scr/κ, 1)α × max(Scr/κ, 1)-1.209 × 0.993Age × 1.018 [if female] × 1.159 [if black]
where:
Scr is serum creatinine in µmol/L,
κ is 61.9 for females and 79.6 for males,
α is -0.329 for females and -0.411 for males,
min indicates the minimum of Scr/κ or 1, and
max indicates the maximum of Scr/κ or 1
Re: need help in creating formula for CKD-EPI equationSince I am using mg/dl, k= 0.7 and 0.9 for Female and male respectively
Re: need help in creating formula for CKD-EPI equationGFR = 141*Min(Scr/κ, 1)*α*Max(Scr/κ, 1) - 1.209*0.993*Age*If(:Name("RACE BLACK")==1,1.159,1)*If(:Sex=="F", 1.018, 1);Re: need help in creating formula for CKD-EPI equation
141 * Choose( :Creat / :Name( "k (CKD EPI CONSTANT) F= 0.7, M=0.9" ) < 1, 1 ) ^ If(
:Name( "k (CKD EPI CONSTANT) F= 0.7, M=0.9" ) == 0.7,
-0.329,
-0.411
) * Choose( :Creat / :Name( "k (CKD EPI CONSTANT) F= 0.7, M=0.9" ) > 1, 1 ) ^ (-1.209) * 0.993 ^ :Age *
If( :Name( "k (CKD EPI CONSTANT) F= 0.7, M=0.9" ) == 0.7,
1.018,
1
) * If( :Name( "RACE BLACK = 1, REST = 0" ) == 1,
1.159,
1
)
I did modify the code and it works, but my values do not match the ones using an online calculation. My formula is over-estimating the GFR.