<?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: Bootstrap for assessing regression coefficient in Proc Logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Bootstrap-for-assessing-regression-coefficient-in-Proc-Logistic/m-p/359677#M18877</link>
    <description>&lt;P&gt;For a general overview of how to bootstrap in SAS, see &lt;A href="http://blogs.sas.com/content/iml/2016/08/10/bootstrap-confidence-interval-sas.html" target="_self"&gt;"Compute a bootstrap confidence interval in SAS"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resample from the data to form the bootstrap samples:&lt;/P&gt;
&lt;P&gt;1) &lt;A href="http://blogs.sas.com/content/iml/2014/01/29/sample-with-replacement-in-sas.html" target="_self"&gt;Use PROC SURVEYSELECT to draw B samples with replacement&lt;/A&gt; from your data. You will obtain one SAS data set that has a REPLICATE variable that identifies the B samples:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=final NOPRINT seed=12345
     out=SAMPLES
     method=urs              /* resample with replacement */
     samprate=1              /* each bootstrap sample has N observations */
     OUTHITS                 
     reps=10;       /* generate this many bootstrap resamples */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) Use a BY REPLICATE statement in your PROC LOGISTIC code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=SAMPLES;
by REPLICATE;
class x1 x2 x3 x4;
model&amp;nbsp;lesion = x1 x2 x3 x4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp;To analyze the bootstrap estimates, follow the ideas in&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/06/27/simulate-many-samples-from-a-logistic-regression-model.html" target="_self"&gt;"Simulate many samples from a logistic regression model."&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 15:11:11 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-05-18T15:11:11Z</dc:date>
    <item>
      <title>Bootstrap for assessing regression coefficient in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Bootstrap-for-assessing-regression-coefficient-in-Proc-Logistic/m-p/359660#M18876</link>
      <description>&lt;P&gt;Dear Braintrust,&lt;/P&gt;&lt;P&gt;I am analyzing data to predict an outcome in 600&amp;nbsp;calves (lung lesions 0/1) based on clinical signs observed in calves.&lt;/P&gt;&lt;P&gt;I used Proc logistic to obtain the regression coefficient. I want to make some prediction rules based on these coefficients.&lt;/P&gt;&lt;P&gt;however, I want to take into account overoptimistic weights and I therefore want to have robust estimates of these regressions coefficients.&lt;/P&gt;&lt;P&gt;I want to know if there is any macro to be able to obtain distribution of these regression coefficients based on bootstrapped samples.&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basic code I used:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;logistic &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=final;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; x1 x2 x3 x4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;lesion = x1 x2 x3 x4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 14:22:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Bootstrap-for-assessing-regression-coefficient-in-Proc-Logistic/m-p/359660#M18876</guid>
      <dc:creator>SBuc</dc:creator>
      <dc:date>2017-05-18T14:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bootstrap for assessing regression coefficient in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Bootstrap-for-assessing-regression-coefficient-in-Proc-Logistic/m-p/359677#M18877</link>
      <description>&lt;P&gt;For a general overview of how to bootstrap in SAS, see &lt;A href="http://blogs.sas.com/content/iml/2016/08/10/bootstrap-confidence-interval-sas.html" target="_self"&gt;"Compute a bootstrap confidence interval in SAS"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resample from the data to form the bootstrap samples:&lt;/P&gt;
&lt;P&gt;1) &lt;A href="http://blogs.sas.com/content/iml/2014/01/29/sample-with-replacement-in-sas.html" target="_self"&gt;Use PROC SURVEYSELECT to draw B samples with replacement&lt;/A&gt; from your data. You will obtain one SAS data set that has a REPLICATE variable that identifies the B samples:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=final NOPRINT seed=12345
     out=SAMPLES
     method=urs              /* resample with replacement */
     samprate=1              /* each bootstrap sample has N observations */
     OUTHITS                 
     reps=10;       /* generate this many bootstrap resamples */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) Use a BY REPLICATE statement in your PROC LOGISTIC code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=SAMPLES;
by REPLICATE;
class x1 x2 x3 x4;
model&amp;nbsp;lesion = x1 x2 x3 x4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp;To analyze the bootstrap estimates, follow the ideas in&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/06/27/simulate-many-samples-from-a-logistic-regression-model.html" target="_self"&gt;"Simulate many samples from a logistic regression model."&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 15:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Bootstrap-for-assessing-regression-coefficient-in-Proc-Logistic/m-p/359677#M18877</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-05-18T15:11:11Z</dc:date>
    </item>
  </channel>
</rss>

