<div dir="ltr"><div dir="ltr">My approach would be as follows:<br>a) Start with MS Excel. It is very simple to use and help is very widely available. One can very easily draw very nice curves and dependent on what intuition comes out of observing the curves fit different simple models to the data and again draw curves of the model outputs against the original curves.<br>b) If this does not give satisfactory results, I would use H2O in R to build a deep learning model based on the data. There are very powerful data visualization packages in R to really go overboard to display the data in very fancy ways and then the deep learning models can very easily incorporate many more variables and more sophisticated models.</div><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 26 Aug 2019 at 11:42, Nick Thompson <<a href="mailto:nickthompson@earthlink.net">nickthompson@earthlink.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_7474214038176906528WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:10pt">Dear Mathematical Friammers,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt">What follows is a problem in mathematics, which, of course, has nothing to do with me.  <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt"><u></u> <u></u></span></i></b></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt">Jones is a diabetic, and he has a glucose monitor that gives him his exact blood glucose level <span style="color:rgb(31,73,125)">moment to</span> moment.  Jones notices at that after breakfast, his blood sugars behave in in very different manners, even though he eats exactly the same food every day, doesn’t exercise at that time of day ever, and takes exactly the same amount of insulin.  Some mornings, his blood sugar rises steadily for several hours after a meal, sometimes it fall<span style="color:rgb(31,73,125)">s</span> steadily.  Only rarely does it remain steady.  One variable seems left for Jones to control and that is the exact timing of the relation between when he take his insulin and the time he begins his meal.  <u></u><u></u></span></i></b></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt"><u></u> <u></u></span></i></b></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt">So, Jones imagines a model as follows.  Because Jones always takes exactly the amount of insulin necessary to account for the amount of sugar he eats, he assumes that the curves of insulin activity and sugar activity are both normal curves, with the same median time and the same sd and, therefore, the same area under the curve.  However, one curve is offset from the other because sometimes Jones takes his insulin before he eats his sugar and sometimes he eats his sugar before he takes his insulin.  Bearing in mind that the Insulin curve SUBTRACTS from the sugar curve, Jones wonders <span style="color:rgb(31,73,125)">about </span>the shape of the difference curve that results from different offsets between eating his meal and taking his insulin.  He wonders if, perhaps, that this whole dramatic failure of control, could be due to the fact that on some days he takes his insulin a little too early and the sugar in the meal is slow to catch up and on other days, he takes it too late and the insulin is slow to  catch up.  Thus, the correct offset is a tipping point, an unstable equilibrium which is very difficult to achieve.  <u></u><u></u></span></i></b></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt"><u></u> <u></u></span></i></b></p><p class="MsoNormal" style="margin-left:0.5in"><b><i><span style="font-size:10pt">Jones is not a mathematician, but he hangs around with mathematicians, and he suspects that there is a software that is readily available on line for free that would allow him to display the different curves that result from the different offsets and, perhaps, even better, display the function that relates the integral of the difference function as a function of the offset.   This function might have some interesting properties that could be used to guide Jones’s injection behavior.  <u></u><u></u></span></i></b></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Does anybody have any thoughts on Jones’s predicament?  <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Not that I care, but still, <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Nick <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Nicholas S. Thompson<u></u><u></u></p><p class="MsoNormal">Emeritus Professor of Psychology and Biology<u></u><u></u></p><p class="MsoNormal">Clark University<u></u><u></u></p><p class="MsoNormal"><a href="http://home.earthlink.net/~nickthompson/naturaldesigns/" target="_blank">http://home.earthlink.net/~nickthompson/naturaldesigns/</a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>============================================================<br>
FRIAM Applied Complexity Group listserv<br>
Meets Fridays 9a-11:30 at cafe at St. John's College<br>
to unsubscribe <a href="http://redfish.com/mailman/listinfo/friam_redfish.com" rel="noreferrer" target="_blank">http://redfish.com/mailman/listinfo/friam_redfish.com</a><br>
archives back to 2003: <a href="http://friam.471366.n2.nabble.com/" rel="noreferrer" target="_blank">http://friam.471366.n2.nabble.com/</a><br>
FRIAM-COMIC <a href="http://friam-comic.blogspot.com/" rel="noreferrer" target="_blank">http://friam-comic.blogspot.com/</a> by Dr. Strangelove<br>
</blockquote></div></div>