☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-07-2022 06:19 PM
(2759 views)
What is the correct syntax for the following calculation (see image)?
Thanks!
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1-0.9144**(exp(60.69-61.18))
EXP or CONSTANT('e') function for e
** for exponential
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use the EXP() function.
--
Paige Miller
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1-0.9144**(exp(60.69-61.18))
EXP or CONSTANT('e') function for e
** for exponential
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Whoops. I'm getting an "Invalid argument to function" error. What am I doing wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The number being generated is too large for a computer to represent. E to those exponents in a regular calculator errors out so something is wrong somewhere in your formulas. Guessing units?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @_maldini_,
I suspect that there are two errors in your calculation:
- Looking at the source of your formula, the 2013 ACC/AHA Guideline on the Assessment of Cardiovascular Risk, it appears that the "mean" value occurring in the argument of the EXP function is a race- and sex-specific constant based on older studies. This is confirmed by the "Calculation Details and Variables" under the online calculator found in https://www.merckmanuals.com/medical-calculators/ACCAHA2013-ja.htm. Only the "individual sum" term is calculated from individual measurements. The formulas for ind_sum_blk_f and mean_blk_f in your code, however, show that you calculate both the sum and the mean from the same set of values, which is definitely wrong. According to either of the two sources linked above the relevant mean value (here: for black females) is mean_blk_f=86.61.
- I would expect realistic "individual sum" values to be about the same order of magnitude as the constant "mean" values. Note that all continuous measurements (such as cholesterol) are logarithmized in the formula. So, extreme outliers leading to individual sums in the thousands (cf. your 11187, etc.) should be completely impossible and indicate that one or more values used must be "way off," like not logarithmized or having the wrong unit, as Reeza has already suggested.