<?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 PROC MODEL: How can I get the data for the Cook's D graph in an output dataset in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373035#M2464</link>
    <description>&lt;P&gt;First a small disclaimer: I am asking this question as a statistical noob on behalf of a custormer of ours.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;We are running SAS 9.4 M3 (SAS/ETS 14.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The customer runs various fit analysis using PROC MODEL&amp;nbsp;and one of the graphs that is being generated is the Cook's D graph&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The question of the customer is: can I get the data that is being used to generate the Cook's D graph in an output dataset and link this back to my source data so I can filter outliers?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the ODS TRACE statement I have been able to derive - I think - the base data that is being used.&lt;/P&gt;
&lt;P&gt;The code I have used (hopefully as a representative example) is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc model data=sashelp.citimon;
   lhur = 1/(a * ip + b) + c;
   fit lhur;
   id date;
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Attached a sample of part the output that is generated, specifically Panel 1 that contains the Cook's D graph.&lt;/P&gt;
&lt;P&gt;Comparing the output in the log against the output&amp;nbsp;my assumption is that the base data for the graphs can be obtained by adding the following statement just before the PROC MODEL statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output DiagnosticsPanel=work.panel;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, it seems as if the dataset contains all the data (the dataset contains 36 variables) that is needed to create the graphs in Panel 1 (and 2?) and I could find no way to relate the data back to the source data. I was hoping that adding the option PLOT(ONLY)=COOKSD would reduce the number of variables in the output dataset but it - as maybe could be expected &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt; - only reduced the number of graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully someone can shed some light on this and help me help our customer.&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14029i6878224F4294C09D/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="ProcModel-Panel1.PNG" title="ProcModel-Panel1.PNG" /&gt;</description>
    <pubDate>Tue, 04 Jul 2017 15:29:58 GMT</pubDate>
    <dc:creator>Resa</dc:creator>
    <dc:date>2017-07-04T15:29:58Z</dc:date>
    <item>
      <title>PROC MODEL: How can I get the data for the Cook's D graph in an output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373035#M2464</link>
      <description>&lt;P&gt;First a small disclaimer: I am asking this question as a statistical noob on behalf of a custormer of ours.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;We are running SAS 9.4 M3 (SAS/ETS 14.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The customer runs various fit analysis using PROC MODEL&amp;nbsp;and one of the graphs that is being generated is the Cook's D graph&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The question of the customer is: can I get the data that is being used to generate the Cook's D graph in an output dataset and link this back to my source data so I can filter outliers?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the ODS TRACE statement I have been able to derive - I think - the base data that is being used.&lt;/P&gt;
&lt;P&gt;The code I have used (hopefully as a representative example) is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc model data=sashelp.citimon;
   lhur = 1/(a * ip + b) + c;
   fit lhur;
   id date;
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Attached a sample of part the output that is generated, specifically Panel 1 that contains the Cook's D graph.&lt;/P&gt;
&lt;P&gt;Comparing the output in the log against the output&amp;nbsp;my assumption is that the base data for the graphs can be obtained by adding the following statement just before the PROC MODEL statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output DiagnosticsPanel=work.panel;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, it seems as if the dataset contains all the data (the dataset contains 36 variables) that is needed to create the graphs in Panel 1 (and 2?) and I could find no way to relate the data back to the source data. I was hoping that adding the option PLOT(ONLY)=COOKSD would reduce the number of variables in the output dataset but it - as maybe could be expected &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt; - only reduced the number of graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully someone can shed some light on this and help me help our customer.&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14029i6878224F4294C09D/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="ProcModel-Panel1.PNG" title="ProcModel-Panel1.PNG" /&gt;</description>
      <pubDate>Tue, 04 Jul 2017 15:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373035#M2464</guid>
      <dc:creator>Resa</dc:creator>
      <dc:date>2017-07-04T15:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MODEL: How can I get the data for the Cook's D graph in an output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373065#M2465</link>
      <description>&lt;P&gt;The dataset includes two variables to help you match back to the original:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID - count of obs from 1 to NObs&lt;/P&gt;
&lt;P&gt;Actual - the observed value&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;_____RESIDUAL_RESIDUAL____MSE_WE - I think this is the Cook's D variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13592"&gt;@Resa&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;First a small disclaimer: I am asking this question as a statistical noob on behalf of a custormer of ours.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;We are running SAS 9.4 M3 (SAS/ETS 14.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The customer runs various fit analysis using PROC MODEL&amp;nbsp;and one of the graphs that is being generated is the Cook's D graph&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The question of the customer is: can I get the data that is being used to generate the Cook's D graph in an output dataset and link this back to my source data so I can filter outliers?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the ODS TRACE statement I have been able to derive - I think - the base data that is being used.&lt;/P&gt;
&lt;P&gt;The code I have used (hopefully as a representative example) is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc model data=sashelp.citimon;
   lhur = 1/(a * ip + b) + c;
   fit lhur;
   id date;
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Attached a sample of part the output that is generated, specifically Panel 1 that contains the Cook's D graph.&lt;/P&gt;
&lt;P&gt;Comparing the output in the log against the output&amp;nbsp;my assumption is that the base data for the graphs can be obtained by adding the following statement just before the PROC MODEL statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output DiagnosticsPanel=work.panel;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, it seems as if the dataset contains all the data (the dataset contains 36 variables) that is needed to create the graphs in Panel 1 (and 2?) and I could find no way to relate the data back to the source data. I was hoping that adding the option PLOT(ONLY)=COOKSD would reduce the number of variables in the output dataset but it - as maybe could be expected &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt; - only reduced the number of graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully someone can shed some light on this and help me help our customer.&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 17:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373065#M2465</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-04T17:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MODEL: How can I get the data for the Cook's D graph in an output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373088#M2466</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for your quick reply.&lt;/P&gt;
&lt;P&gt;Based on your information (created a needle plot using the variable you indicated) it seems you have this correct.&lt;/P&gt;
&lt;P&gt;I will confirm with the customer tomorrow and if your information is correct will mark your reply as a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would have been nice if they would have given the column a somewhat more meaningfull name though &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://communities.sas.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;P&gt;Will keep you posted&lt;/P&gt;
&lt;P&gt;--Resa&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 19:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/PROC-MODEL-How-can-I-get-the-data-for-the-Cook-s-D-graph-in-an/m-p/373088#M2466</guid>
      <dc:creator>Resa</dc:creator>
      <dc:date>2017-07-04T19:52:18Z</dc:date>
    </item>
  </channel>
</rss>

