<?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 how to calculate integrated discriminatory improvement (IDI) using SAS MACRO in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698572#M213662</link>
    <description>&lt;P&gt;hi, I doing a research which compare basic model with new model. This new model is basic model+ a new biomarker. I have a dichotomous outcome. I want to calculate IDI and NRI to show the added predictive ability of this new marker on the basic model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a paper by Kevin Kennedy &lt;STRONG&gt;A SAS macro to compute added predictive ability of a new marker in logistic regression.&lt;/STRONG&gt;&amp;nbsp;I try to used the syntax in the appendix of this paper but the result did not come out. here I post what the log said. it keep saying&amp;nbsp;uninitialized.&lt;/P&gt;&lt;P&gt;what did I do wrong? or could you help me where I could download the macro so that I could just used it instead? I already email Mr Kennedy but still not receive any reply. it would be nice if someone could help me.tx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;label relative_idi='Relative IDI';format pvalue_idi pval.;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format PVAL was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;141 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;129:23 129:51&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_event_new is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_event_old is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_nonevent_new is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_nonevent_old is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable eventstderr is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable noneventstderr is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 122:17 1 at 125:12 1 at 125:29 1 at 125:33 1 at 125:49 1 at 127:11 1 at 127:20 1 at 127:25 1 at 128:10&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 128:19 1 at 128:24 1 at 131:7 1 at 131:14 1 at 131:16 1 at 131:33 1 at 131:37 1 at 131:53 1 at 133:16&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 133:17 1 at 133:26 1 at 134:25 1 at 136:83 1 at 137:82 1 at 138:22 1 at 139:23&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.FIN has 1 observations and 20 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.08 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.04 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;142&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;143&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;144&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;145 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;157&lt;/DIV&gt;</description>
    <pubDate>Fri, 13 Nov 2020 04:17:42 GMT</pubDate>
    <dc:creator>miminiari_naomi</dc:creator>
    <dc:date>2020-11-13T04:17:42Z</dc:date>
    <item>
      <title>how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698572#M213662</link>
      <description>&lt;P&gt;hi, I doing a research which compare basic model with new model. This new model is basic model+ a new biomarker. I have a dichotomous outcome. I want to calculate IDI and NRI to show the added predictive ability of this new marker on the basic model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a paper by Kevin Kennedy &lt;STRONG&gt;A SAS macro to compute added predictive ability of a new marker in logistic regression.&lt;/STRONG&gt;&amp;nbsp;I try to used the syntax in the appendix of this paper but the result did not come out. here I post what the log said. it keep saying&amp;nbsp;uninitialized.&lt;/P&gt;&lt;P&gt;what did I do wrong? or could you help me where I could download the macro so that I could just used it instead? I already email Mr Kennedy but still not receive any reply. it would be nice if someone could help me.tx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;label relative_idi='Relative IDI';format pvalue_idi pval.;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format PVAL was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;141 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;129:23 129:51&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_event_new is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_event_old is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_nonevent_new is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable p_nonevent_old is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable eventstderr is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable noneventstderr is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 122:17 1 at 125:12 1 at 125:29 1 at 125:33 1 at 125:49 1 at 127:11 1 at 127:20 1 at 127:25 1 at 128:10&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 128:19 1 at 128:24 1 at 131:7 1 at 131:14 1 at 131:16 1 at 131:33 1 at 131:37 1 at 131:53 1 at 133:16&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;1 at 133:17 1 at 133:26 1 at 134:25 1 at 136:83 1 at 137:82 1 at 138:22 1 at 139:23&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.FIN has 1 observations and 20 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.08 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.04 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;142&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;143&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;144&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;145 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;157&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Nov 2020 04:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698572#M213662</guid>
      <dc:creator>miminiari_naomi</dc:creator>
      <dc:date>2020-11-13T04:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698614#M213676</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the paper code seems to work with the example provided.&lt;/P&gt;
&lt;P&gt;You may have copy/paste issues, try the code I've reindented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 09:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698614#M213676</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-11-13T09:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698698#M213705</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When SAS reports a variable is uninitialized that means the variable name appears in code but has no values. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example.&lt;/P&gt;
&lt;PRE&gt;16   data example;
17      x=3;
18      label y ='Some nonexistent values';
19   run;

NOTE: Variable y is uninitialized.
NOTE: The data set WORK.EXAMPLE has 1 observations and 1
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;This sort of thing is moderately common when using someone else's code without understanding it. The author likely used different variables at some point than you do but the code still uses the authors variables. But you did not provide any values for those so you get the note.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro code can compound this by building variable names dynamically and so you can't just search for the offending text in the program code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are running a macro then you want to set OPTIONS MPRINT; prior to executing the macro so the entire code as generated appears in the log and you can get an idea of what needs to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 16:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/698698#M213705</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-13T16:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699360#M213946</link>
      <description>&lt;P&gt;hi, thank for your replay. I try to use your code. but it seems that I cannot make the data nri1. the output folder for data create nri1 data but it's empty. the log said this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;121 DATA nri1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;122 group="Category-Free NRI";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;123 p_up_event=&amp;amp;num_event_up_user/&amp;amp;num_event;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Apparent symbolic reference NUM_EVENT not resolved.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;124 p_down_event=&amp;amp;num_event_down_user/&amp;amp;num_event;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;what did I do wrong?tx&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 04:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699360#M213946</guid>
      <dc:creator>miminiari_naomi</dc:creator>
      <dc:date>2020-11-17T04:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699361#M213947</link>
      <description>should I run the code step by step?</description>
      <pubDate>Tue, 17 Nov 2020 04:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699361#M213947</guid>
      <dc:creator>miminiari_naomi</dc:creator>
      <dc:date>2020-11-17T04:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699362#M213948</link>
      <description>tx for your reply. I don't have the macro. I have the syntax. when should I put the OPTIONS MPRINT?&lt;BR /&gt;tx&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Nov 2020 04:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699362#M213948</guid>
      <dc:creator>miminiari_naomi</dc:creator>
      <dc:date>2020-11-17T04:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699364#M213949</link>
      <description>it seems like data nri1 is not calculate</description>
      <pubDate>Tue, 17 Nov 2020 04:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699364#M213949</guid>
      <dc:creator>miminiari_naomi</dc:creator>
      <dc:date>2020-11-17T04:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate integrated discriminatory improvement (IDI) using SAS MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699443#M213966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As far as I can see, the macros are variable independent and should work with any kind of data, you only need to adapt the model in the call.&lt;/P&gt;
&lt;P&gt;You have the macros in the paper and I've extracted and provided them in my previous post. Why aren't you following the examples?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works with sashelp.cars:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*APPENDIX C: EXAMPLE;
DATA cars;
   set sashelp.cars;
   msrp_40k=(msrp&amp;gt;40000); /*indicator for car being over $40,000*/
   cnt+1;
RUN;

/*Test to see if Country of Origin adds to the prediction of
   msrp_40k with engine size, weight, and
   MPG_Highway in model
   Using NRI groups (&amp;lt;10%, 10-30%, &amp;gt;30%)*/
/*initial model*/
PROC LOGISTIC DATA=cars descending;
   model msrp_40k=enginesize weight mpg_highway;
   output out=m1 pred=p1;
RUN;

/*new model*/
PROC LOGISTIC DATA=cars descending;
   class origin;
   model msrp_40k=enginesize weight mpg_highway origin;
   output out=m2 pred=p2;
RUN;

PROC SQL;
   CREATE table cars2 as SELECT *
   FROM m1 as a left join m2 as b on a.cnt=b.cnt;
QUIT;

%add_predictive(DATA=cars2,y=msrp_40k,p_old=p1,p_new=p2, nripoints=.1 .3);  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and with sashelp.class:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*APPENDIX C: EXAMPLE;
DATA class;
   set sashelp.class;
   height_60=(height&amp;gt;60); /*indicator for height over 60*/
   cnt+1;
RUN;

PROC LOGISTIC DATA=class descending;
   model height_60=weight weight age;
   output out=m1 pred=p1;
RUN;

/*new model*/
PROC LOGISTIC DATA=class descending;
   class sex;
   model height_60=weight age sex;
   output out=m2 pred=p2;
RUN;

PROC SQL;
   CREATE table class2 as SELECT *
   FROM m1 as a left join m2 as b on a.cnt=b.cnt;
QUIT;

%add_predictive(DATA=class2,y=height_60,p_old=p1,p_new=p2, nripoints=.1 .3); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you still can not fix it you should provide the code you are running together with sample data.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 11:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-integrated-discriminatory-improvement-IDI-using/m-p/699443#M213966</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-11-17T11:05:13Z</dc:date>
    </item>
  </channel>
</rss>

