This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, gold 20Aug2020
gold 1sep2021 Here are some calculations for converting HOMA-IR measurement from average blood glucose mg/dl over a 3 month period. Table is in US Units for Blood Glucose etc. Console program outputs data as table in TCL table format and comma delimited spreadsheet.
Here are TCL calculations on the equation converting HOMO-IR from Fasting Blood Glucose mg/dl and insulin measures. HOMA-IR standing for Homeostatic Model Assessment of Insulin Resistance is an indirect measurement that tells you and your doctor how much insulin your pancreas needs to make to control your blood sugar levels and evaluate pancreas/liver functions. The formula is HOMA_IR = expr { $insulin * $glucose * $scale_factor} . $scale_factor is (1/405.). Example calculation as HOMA_IR = expr { $insulin * $glucose * $scale_factor }, expr { 4 * 100 * $scale_factor }, rounds to 1.0 . Console program example demo was written on Windows 10, working under TCL version 8.6 Table is in US Units for Blood Glucose etc. As a peg point, 5 HbA1c units converts to 100 mg/dl abbreviation for milligrams per deciliter. Note. This Diabetes Care field is rapidly changing, one needs to check in at ADA professional.diabetes.org and pubmed search < HOMO-IR > for the latest up to date info.
European SI units as best understood. The HOMA-IR calculations here requires U.S. standard units.
To convert component terms ( $insulin & $glucose) from international S.I. units: Insulin: pmol/L to uIU/mL, divide by (÷) 6 Glucose: mmol/L to mg/dL, multiply by (x) 18
David R. Matthews, MD is a Professor of Diabetic Medicine at the University of Oxford. He is the Deputy co-ordinator and member of the Executive and Policy Advisory Committees of the UK Prospective Study of Diabetes (UKPDS). David R. Matthews, MD is currently investigating the inter-relationships between insulin resistance and beta cell function, and the effects of a low carbohydrate diet in people with and without type 2 diabetes at Churchill Hospital with the Center of Diabetes, in the United Kingdom.
ADA Quotes. Therefore, to change glucose from mg/dL to mmol/L, one divides by 18.016 (usually rounded off to 18), and values are multiplied by 18 to switch from mmol/L to mg/dL. For example, 126 mg/dL is equivalent to 7.0 mmol/L, and 40 mg/dL is 2.2 mmol/L.
ADA Quotes. Developing an HbA1c-Based Equation to Estimate Blood Glucose in Maintenance Hemodialysis Patients,2013. Some equations showing a good correlation between HbA1c and average BG (AG) levels.The Diabetes Control and Complications Trial DCCT formula is Average Blood Glucose = expr { 35.6 * HbA1c − 77.3} < in milligrams per deciliter>.
In planning any software, it is advisable to gather a number of testcases to check the results of the program.
Example calculation for 4 insulin and 100 glucose. Calculation as HOMA_IR = expr { $insulin * $glucose * $scale_factor }, expr { 4 * 100 * $scale_factor }, rounds to 1.0 . Any HOMA_IR result above the cut-off value of 2 suggests insulin resistance. However, the combined lab blood results have to be evaluated by your doctor MD. 2nd set of calculations reported that HOMA_IR approximates 0.99 or 1.0 rounded. Quicki index =~ 0.38. QUICKI_index= 1/(log(insulin) + log(glucose)), different formula. For the glucose concentration in mmol/L, Use HOMA-IR = (insulin * glucose) / 22.5 For the Blood Glucose in mg/dL. HOMA-IR = (insulin * glucose ) / 405. In both cases, the insulin units is in mU/L.
;# formula QUICKI_index insulin resistance = 1/(log(insulin) + log(glucose)), different formula. proc QUICKI_INDEX_IR { insulin glucose } { return [ expr { 1./(log10($insulin) + log10($glucose))} ] } ;# Usage set answer [ QUICKI_INDEX_IR 4. 100. ]
table 1 | printed in | TCL format | |
---|---|---|---|
homa_IR_2 units | insulin units | glucose units | comment, if any |
0.81500 | 3.3000 | 100. | |
0.84000 | 3.4000 | 100. | |
0.86400 | 3.5000 | 100. | |
0.88900 | 3.6000 | 100. | |
0.91400 | 3.7000 | 100. | |
0.93800 | 3.8000 | 100. | |
0.96300 | 3.9000 | 100. | |
0.98800 | 4.0000 | 100. | answer for testcase 1 |
1.0120 | 4.1000 | 100. | |
1.0370 | 4.2000 | 100. |
Example calculation for 6 insulin and 110 glucose. Evals HOMA_IR approximates 1.63. Quicki index =~ 0.35.
Example calculation for 2 insulin and 90 glucose. Evals HOMA_IR approximates 0.44. Quicki index =~ 0.44.
Protocol for A1c of 5.0 and insulin of 4. A1c of 5.0 converts to average Blood Glucose of 96.8. Example calculation for 4 insulin and 96.8 glucose evals to HOMA-IR of 0.48. Quicki index =~ 0.44
# pretty print from autoindent and ased editor # Convert homa_IR_2 from Average Blood Glucose mg/dl V2 # Console program example demo # written on Windows 10 on TCL # working under TCL version 8.6 # gold on TCL Club , 30aug2021 # Each homa_IR_2 reading usually from # limits of 0.4 to 11 # Roughly 5 HbA1c converts to 100 # mg/dl abbrev. for milligrams per deciliter # mmol/L abbrev. for milligrams per Liter package require Tk package require math::numtheory package require math::constants package require math::trig package require math namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory math::trig math::constants } set tclprecision 17 console show # following dresses up console output to easy eye console eval {.console config -bg palegreen} console eval {.console config -font {fixed 20 bold}} console eval {wm geometry . 40x20} set tclprecision 17 # conversion unit formulas in procs # HOMA_IR = expr { $insulin * $glucose * $scale_factor} proc HOMA_IR2 { insulin glucose } { set scale_factor [ expr { 1. / 405. } ] return [expr { $insulin * $glucose * $scale_factor}]} # hbA1c_convert_to_average_blood_glucose mg/dl HbA1c proc a1c hbA1c { expr { 35.6*$hbA1c -77.3} } # convert mg/dl to mmol/L average blood glucose # some papers round off 18.016 to mgdl/18. proc mgdl_to_mmoll mgdl { expr { $mgdl/18.0 } } # convert mmol/L to mg/dl average blood glucose proc mmoll_to_mgdl mmoll { expr { $mmoll*18.0 } } # proc precisionx used to round off floating point numbers proc precisionx {precision float} { # tcl:wiki:Floating-point formatting, <AM> # select numbers only, not used on every number. set x [ expr {round( 10 ** $precision * $float) / (10.0 ** $precision)} ] # rounded or clipped to nearest 5ird significant figure set x [ format "%#.5g" $x ] return $x } proc table_format_out n { set sum 0 # initial level set count 0.0 set glucose 100. puts "%| table| | printed in|TCL format |% " puts "%| homa_IR_2 units | insulin units |glucose units |comment, if any|% " # adapted proc from <RS> # printout in TCL WIKI format table for { set i 1 } { $i <= $n } { incr i } { set count [+ $count .1] set insulin $count set homa_IR_2 [ HOMA_IR2 $insulin $glucose ] set insulin [ precisionx 3 $insulin ] set glocose [ precisionx 3 $glucose ] puts "&| [ precisionx 3 $homa_IR_2 ] | $insulin | $glucose | |&" incr sum $i } return $sum } table_format_out 90
Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Thanks, gold 12Aug2020
Category Numerical Analysis | Category Toys | Category Calculator | Category Mathematics | Category Example | Toys and Games | Category Games | Category Application | Category GUI |