Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- need help in creating formula for CKD-EPI equation

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

need help in creating formula for CKD-EPI equation

Created:
May 7, 2020 9:44 AM
| Last Modified: May 7, 2020 10:24 AM
(419 views)

I 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?

6 REPLIES 6

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

It'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 )
```

-Jeff

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

I 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?

Learn it once, use it forever!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

GFR = 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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

Created:
May 7, 2020 10:56 AM
| Last Modified: May 8, 2020 4:30 AM
(399 views)
| Posted in reply to message from Drrads 05-07-2020

```
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.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

Since I am using mg/dl, k= 0.7 and 0.9 for Female and male respectively

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: need help in creating formula for CKD-EPI equation

`GFR = 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);`

Learn it once, use it forever!

Article Labels

There are no labels assigned to this post.