<?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: Bootstrape case-resampling Logistic regression in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825096#M554</link>
    <description>&lt;P&gt;That is where I got my code from but I could find the answers to my questions in that article (unless I missed them).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2022 18:48:03 GMT</pubDate>
    <dc:creator>mihhghjl</dc:creator>
    <dc:date>2022-07-23T18:48:03Z</dc:date>
    <item>
      <title>Bootstrape case-resampling Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825017#M552</link>
      <description>&lt;P&gt;I am trying to do logistic regression bootstrap case resampling on my data which contains sample size of 71. Case/control study with four binary independent variables. I have the following code and output but unsure about two things.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Do I need to have "freq NumberHits" in step 3 if I use "outhits" in step 2? I am unsure what the freq step does in the logistic regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Is the output for the 95% CI the Estimated Coefficients which I would then exponentiate to obtain the odds ratio interval?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* 1. compute the statistics on the original data */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc logistic data=cwd.final3;&lt;BR /&gt;class s8a1yn(ref='1') '28cat01'n(ref='1') '23cyn'n(ref='1') dist_wild_10kmyn(ref='1') / param=reference;&lt;BR /&gt;model casenum= '23cyn'n '28cat01'n s8a1yn dist_wild_10kmyn / firth covb;&amp;nbsp; &amp;nbsp; &lt;FONT color="#FF0000"&gt;/* original estimates */&lt;/FONT&gt;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-07-22 at 3.10.11 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73646i33BE8408807B8D6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-07-22 at 3.10.11 PM.png" alt="Screen Shot 2022-07-22 at 3.10.11 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;title "Bootstrap Distribution of Estimates";&lt;BR /&gt;title2 "Case Resampling";&lt;BR /&gt;%let NumSamples = 10000;&amp;nbsp;&lt;FONT color="#FF0000"&gt; /* number of bootstrap resamples */&lt;/FONT&gt;&lt;BR /&gt;%let IntEst = -3.5228;&amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;/* intercept estimate under analysis of max likelihood original estimates for later visualization */&lt;/FONT&gt;&lt;BR /&gt;%let Est23 = 1.5088;&lt;BR /&gt;%let Est28 = 1.7238;&lt;BR /&gt;%let Estdist = 1.6265;&lt;BR /&gt;%let Estimp = 2.2814;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;/* 2. Generate many bootstrap samples by using PROC SURVEYSELECT */&lt;/STRONG&gt;&lt;BR /&gt;proc surveyselect data=sample seed=1234&lt;BR /&gt;out=BootCases(rename=(Replicate=SampleID))&lt;BR /&gt;method=urs&amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;/* resample with replacement */&lt;/FONT&gt;&lt;BR /&gt;sampsize=71&amp;nbsp; &lt;FONT color="#FF0000"&gt;/* each bootstrap sample has N observations */&lt;/FONT&gt;&lt;BR /&gt;outhits&amp;nbsp;&lt;FONT color="#FF0000"&gt; /* OUTHITS use OUTHITS option to suppress the frequency var */&lt;/FONT&gt;&lt;BR /&gt;reps=&amp;amp;NumSamples;&amp;nbsp; &lt;FONT color="#FF0000"&gt;/* generate NumSamples bootstrap resamples */&lt;/FONT&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;/* 3. Compute the statistic for each bootstrap sample */&lt;/STRONG&gt;&lt;BR /&gt;proc logistic data=BootCases outest=PEBoot noprint;&lt;BR /&gt;by sampleID;&lt;BR /&gt;freq NumberHits;&lt;BR /&gt;class '23cyn'n(ref='1') '28cat01'n(ref='1') s8a1yn(ref='1') dist_wild_10kmyn(ref='1') / param=reference;&lt;BR /&gt;model casenum= '23cyn'n '28cat01'n s8a1yn dist_wild_10kmyn / firth covb;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;/* 4. Obtain the 95% CI*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc stdize data=PEBoot vardef=N pctlpts=2.5 97.5 PctlMtd=ORD_STAT outstat=Pctls;&lt;BR /&gt;var Intercept '23cyn0'n '28cat010'n s8a1yn0 dist_wild_10kmyn0;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc report data=Pctls nowd;&lt;BR /&gt;where _type_ =: 'P';&lt;BR /&gt;label _type_ = 'Confidence Limit';&lt;BR /&gt;columns ('Bootstrap Confidence Intervals of Estimated coefficients(B=10,000)' _ALL_);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-07-22 at 3.11.16 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73647iE78CDAF628F7F132/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-07-22 at 3.11.16 PM.png" alt="Screen Shot 2022-07-22 at 3.11.16 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 20:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825017#M552</guid>
      <dc:creator>mihhghjl</dc:creator>
      <dc:date>2022-07-22T20:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bootstrape case-resampling Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825040#M553</link>
      <description>&lt;P&gt;Look here :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bootstrap regression estimates: Case resampling&lt;BR /&gt;By Rick Wicklin on The DO Loop October 24, 2018&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/10/24/bootstrap-regression-case-resampling.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/10/24/bootstrap-regression-case-resampling.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 23:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825040#M553</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-07-22T23:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bootstrape case-resampling Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825096#M554</link>
      <description>&lt;P&gt;That is where I got my code from but I could find the answers to my questions in that article (unless I missed them).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 18:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Bootstrape-case-resampling-Logistic-regression/m-p/825096#M554</guid>
      <dc:creator>mihhghjl</dc:creator>
      <dc:date>2022-07-23T18:48:03Z</dc:date>
    </item>
  </channel>
</rss>

