<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Area under the curve glucose in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756400#M30072</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Min    Glucose ;
cards;
-7	75
0	73
2	73
12	78
28	106
43	110
58	102
73	101
88	99
103	88
118	82
133	82
148	80
163	79
178	76
193	74
209	75
224	74
244	78
;

data temp;
 set have;
 delta=dif(min);
 high=mean(lag(Glucose),Glucose);
run;
proc sql noprint;
select sum(delta*high) into : auc from temp;
quit;


proc sgplot data=have;
series x=min y=glucose;
inset "AUC=&amp;amp;auc";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 24 Jul 2021 10:32:00 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-07-24T10:32:00Z</dc:date>
    <item>
      <title>Area under the curve glucose</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756337#M30070</link>
      <description>&lt;P&gt;I am a graduate student and I need to analyze area under the curve for the following data set (individual subject), can someone give me a simple code for it please. I will do this for every subject and after that I will run the ANOVAs pre and post, thank you very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Min&amp;nbsp; &amp;nbsp; Glucose&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-7&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&g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TD&gt;244&lt;/TD&gt;&lt;TD&gt;78&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 23 Jul 2021 23:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756337#M30070</guid>
      <dc:creator>Soontobeprofess</dc:creator>
      <dc:date>2021-07-23T23:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Area under the curve glucose</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756400#M30072</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Min    Glucose ;
cards;
-7	75
0	73
2	73
12	78
28	106
43	110
58	102
73	101
88	99
103	88
118	82
133	82
148	80
163	79
178	76
193	74
209	75
224	74
244	78
;

data temp;
 set have;
 delta=dif(min);
 high=mean(lag(Glucose),Glucose);
run;
proc sql noprint;
select sum(delta*high) into : auc from temp;
quit;


proc sgplot data=have;
series x=min y=glucose;
inset "AUC=&amp;amp;auc";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jul 2021 10:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756400#M30072</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-24T10:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Area under the curve glucose</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756404#M30073</link>
      <description>&lt;P&gt;Dear community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you so much for your help. The code runs fine. I have two more questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first, I forgot to ask, I need to calculate AUC from minute 0 to 240 only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second one, in case on missing data (in rare cases, some of the glucose sensors didn't catch the&amp;nbsp; last hour of glucose readings), how can i modify the code to compensate for it? Thank you very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 14:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756404#M30073</guid>
      <dc:creator>Soontobeprofess</dc:creator>
      <dc:date>2021-07-24T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Area under the curve glucose</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756475#M30075</link>
      <description>For first question:&lt;BR /&gt;Add a filter condition .&lt;BR /&gt;&lt;BR /&gt;data temp;&lt;BR /&gt; set have(where=(min between 0 and 240));&lt;BR /&gt;..........&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For second question, you can impute the missing value with lag value . Like :&lt;BR /&gt;data temp;&lt;BR /&gt; set   have(where=(min between 0 and 240));&lt;BR /&gt;retain new_glucose  ;&lt;BR /&gt;if not missing(glucose ) then new_glucose =glucose ;&lt;BR /&gt;drop glucose ;&lt;BR /&gt;run;</description>
      <pubDate>Sun, 25 Jul 2021 10:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Area-under-the-curve-glucose/m-p/756475#M30075</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-25T10:49:18Z</dc:date>
    </item>
  </channel>
</rss>

