<?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: looking for macro on saving chi squre differences generated by boostrap in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286223#M4247</link>
    <description>&lt;P&gt;You're welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I just realized I used a interval dependent variable in my example. Please don't let that be a distraction. :))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ray&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 19:15:16 GMT</pubDate>
    <dc:creator>rayIII</dc:creator>
    <dc:date>2016-07-21T19:15:16Z</dc:date>
    <item>
      <title>looking for macro on saving chi square differences generated by bootstrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/285803#M4237</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;I'm struggling with the methodology and technique metioned below. If there is any one who has some ideas on how this work with SAS Macro or kindly point me to the right direction to google the 'key words/terminology', that would be a great help! Thanks!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: black;"&gt;The purpose of doing it is to show the contribution to the predictiveness of adding the&amp;nbsp;6 selected&amp;nbsp;variables.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-family: 'Tahoma',sans-serif; color: black;"&gt;1. First, generate 500 bootstrap samples of both the new model B and new model C and “freeze&amp;nbsp;the&amp;nbsp;samples.”&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-family: 'Tahoma',sans-serif; color: black;"&gt;2. For each bootstrap sample you compare the model B and model C chi-square. &amp;nbsp;There will be 500 pairs of chi square differences, which represents&amp;nbsp;the&amp;nbsp;population of chi-square differences. &amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-family: 'Tahoma',sans-serif; color: black;"&gt;3. We can then compare with a chi-square test using the number of degrees of freedom of the&amp;nbsp;selected variables included. &amp;nbsp;So, for example, if&amp;nbsp;6 variables are included in the final model after bootstrapping, we would run a chi square test with&amp;nbsp;6 degrees of freedom.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-family: 'Tahoma',sans-serif; color: black;"&gt;You valuable inputs would be highly appreciated! Thank you.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 17:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/285803#M4237</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2016-07-21T17:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: looking for macro on saving chi squre differences generated by boostrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286134#M4244</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may not need a macro for this. It can probably be done with BY group processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SURVEYSELECT can create a dataset containing your 500 wr samples.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most modeling procs (proc logistic, etc.) support by groups.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can save chi-square statistics for each&amp;nbsp;sample&amp;nbsp;(group) using ODS Output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This document may help:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/268-2010.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings10/268-2010.pdf&lt;/A&gt;&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;P&gt;Ray&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 13:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286134#M4244</guid>
      <dc:creator>rayIII</dc:creator>
      <dc:date>2016-07-21T13:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: looking for macro on saving chi square differences generated by bootstrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286149#M4245</link>
      <description>&lt;P&gt;Here is some code just&amp;nbsp;to (hopefully) get you started.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It generates a distribution of LR chisquare statistics for a logistic regression model run on 25 samples of the Cars dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It&amp;nbsp;would need to be adapted for your situation (your data/model/modeling proc). Also, you want to compare two models and I'm running just one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=sashelp.cars out=samples
	 seed=30459584 
	 method=urs 
	 outhits
	 samprate=.50
	 rep=25; 
 run;


proc logistic data = samples ;	
    class origin; 
	model msrp = horsepower length origin; 
	by replicate;  
	ods output globaltests = LRChiSq (where=(test='Likelihood Ratio'));
run; 


proc univariate data = LRChiSq;
	var chiSq; 
	histogram;
run; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 17:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286149#M4245</guid>
      <dc:creator>rayIII</dc:creator>
      <dc:date>2016-07-21T17:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: looking for macro on saving chi squre differences generated by boostrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286160#M4246</link>
      <description>&lt;P&gt;This is very helpful! Thank you so much for the detailed instruction. Really appreicat that.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 15:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286160#M4246</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2016-07-21T15:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: looking for macro on saving chi squre differences generated by boostrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286223#M4247</link>
      <description>&lt;P&gt;You're welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I just realized I used a interval dependent variable in my example. Please don't let that be a distraction. :))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ray&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 19:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286223#M4247</guid>
      <dc:creator>rayIII</dc:creator>
      <dc:date>2016-07-21T19:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: looking for macro on saving chi squre differences generated by boostrap</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286228#M4249</link>
      <description>Hi Ray,&lt;BR /&gt;&lt;BR /&gt;Thanks for the hint.</description>
      <pubDate>Thu, 21 Jul 2016 19:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/looking-for-macro-on-saving-chi-square-differences-generated-by/m-p/286228#M4249</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2016-07-21T19:34:37Z</dc:date>
    </item>
  </channel>
</rss>

