<?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: Jackboot Macro Question in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/764841#M37367</link>
    <description>Thanks for the response! I agree that modifying the data structure would work. I was hoping to be able to modify the macro so that I would not have to transpose from long to wide, run the macro, and then transpose back to long (as I need the data in long format for my next steps); however, this may be the easiest fix.&amp;nbsp;</description>
    <pubDate>Mon, 30 Aug 2021 14:04:26 GMT</pubDate>
    <dc:creator>jec150</dc:creator>
    <dc:date>2021-08-30T14:04:26Z</dc:date>
    <item>
      <title>Jackboot Macro Question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763709#M37276</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to alter the jackboot macro (which can be found here: &lt;A href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.sas.com%2Fkb%2F24%2F982.html&amp;amp;data=04%7C01%7Cjess.cheng%40pitt.edu%7C78e1191482d144df9fe908d9673944b4%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637654317918932967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=uqiFMuPn%2B1iYgxOb67KW6Xo2a5enQr2FesclzX6WecI%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/24/982.html&lt;/A&gt;). I have a long dataset with 1-2 rows per participant (i.e., 167 participants providing 2 rows of data and 3 participants providing 1 row of data for a total of 337 rows).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of dropping one row at a time as would be normal for jackknifing, I need to drop all 1-2 rows associated with each participant at a time (i.e., 167 datasets having 335 rows and 3 datasets having 336 rows). I believe only the %jackby or %jackslow macros (below) of the jackboot macro program need to be altered. Thoughts on how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro jackby( /* Jackknife resampling */&lt;BR /&gt;data=&amp;amp;_jackdat,&lt;BR /&gt;print=0&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;data JACKDATA/view=JACKDATA;&lt;BR /&gt;do _sample_=1 to &amp;amp;nobs;&lt;BR /&gt;do _i=1 to &amp;amp;nobs;&lt;BR /&gt;if _i^=_sample_ then do;&lt;BR /&gt;_obs_=_i;&lt;BR /&gt;set &amp;amp;data point=_i;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;BR /&gt;%if &amp;amp;syserr&amp;gt;4 %then %goto exit;&lt;/P&gt;&lt;P&gt;%if &amp;amp;print %then %do;&lt;BR /&gt;proc print data=JACKDATA; id _sample_ _obs_; run;&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%exit:;&lt;BR /&gt;%mend jackby;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro jackslow( /* Uniform jackknife sampling and analysis&lt;BR /&gt;without BY processing */&lt;BR /&gt;data=&amp;amp;_jackdat&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;%put %cmpres(WARNING: Jackknife analysis will be slow because the&lt;BR /&gt;ANALYZE macro did not use the BYSTMT macro.);&lt;/P&gt;&lt;P&gt;data JACKDIST; set JACKACT; _sample_=0; delete; run;&lt;/P&gt;&lt;P&gt;options nonotes;&lt;BR /&gt;%local sample;&lt;BR /&gt;%do sample=1 %to &amp;amp;nobs;&lt;BR /&gt;%put Jackknife sample &amp;amp;sample;&lt;BR /&gt;data _TMPD_;&lt;BR /&gt;drop _i;&lt;BR /&gt;do _i=1 to &amp;amp;nobs;&lt;BR /&gt;set &amp;amp;data;&lt;BR /&gt;if _i^=&amp;amp;sample then output;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;BR /&gt;%if &amp;amp;syserr&amp;gt;4 %then %goto exit;&lt;/P&gt;&lt;P&gt;%analyze(data=_TMPD_,out=_TMPS_);&lt;BR /&gt;%if &amp;amp;syserr&amp;gt;4 %then %goto exit;&lt;BR /&gt;data _TMPS_; set _TMPS_; _sample_=&amp;amp;sample; run;&lt;BR /&gt;%if &amp;amp;syserr&amp;gt;4 %then %goto exit;&lt;BR /&gt;proc append data=_TMPS_ base=JACKDIST; run;&lt;BR /&gt;%if &amp;amp;syserr&amp;gt;4 %then %goto exit;&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%exit:;&lt;BR /&gt;options notes;&lt;BR /&gt;%mend jackslow;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 20:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763709#M37276</guid>
      <dc:creator>jec150</dc:creator>
      <dc:date>2021-08-24T20:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Jackboot Macro Question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763857#M37277</link>
      <description>&lt;P&gt;I have a cursory understanding of Jackknife and Bootstrap.&amp;nbsp; And I haven't used these macros.&amp;nbsp; But I wonder, is it that you as the analyst give a dataset of distinct participant IDs as "data" to the &lt;SPAN&gt;Jackboot Macros&lt;/SPAN&gt;, and then you as the analyst write the %ANALYZE macro function which reads the dataset of selected&amp;nbsp;participant IDs chosen by &lt;SPAN&gt;Jackboot &lt;/SPAN&gt; and you as the analyst also write into %ANALYZE all the logic that handles multiple rows and returns a dataset of measurements (I assume one row per ID) back to the macros?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the simple case that original data is already one row per participant, you would just give the original data set.&amp;nbsp; But in the context you describe, is it that you give the list of participants, Jackboot chooses which are for what purpose and which are in what resampled segmentation of the data.&amp;nbsp; You deal with all that in the %ANALYZE macro?&amp;nbsp; If so, definitely use indexed datasets collect and merge your selected data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my educated guess, since no one else is offering...&amp;nbsp; but then again...&amp;nbsp; this question may not be in the best forum space.&amp;nbsp; We might-should ask a moderator to move this to&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures" target="_self"&gt;Statistical Procedures&lt;/A&gt;.&amp;nbsp; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; &lt;SPAN class="UserName lia-user-name lia-user-rank-SAS-Super-FREQ"&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 14:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763857#M37277</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-08-25T14:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Jackboot Macro Question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763871#M37279</link>
      <description>&lt;P&gt;It seems like the simpler approach would be to modify the data structure so that each participant is one row. By definition, a jackknife sample is a "leave one out" sample and there are exactly N jackknife samples for a data set that has N observations. All of the jackknife statistics are based on this fact. I don't think you can use the Jackknife formulas for a "leave on participant out" sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you haven't already read it, the article "Jackknife estimates in SAS" provides an overview of the Jackknife method and various ways to create the jackknife samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 14:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/763871#M37279</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-25T14:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Jackboot Macro Question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/764841#M37367</link>
      <description>Thanks for the response! I agree that modifying the data structure would work. I was hoping to be able to modify the macro so that I would not have to transpose from long to wide, run the macro, and then transpose back to long (as I need the data in long format for my next steps); however, this may be the easiest fix.&amp;nbsp;</description>
      <pubDate>Mon, 30 Aug 2021 14:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Jackboot-Macro-Question/m-p/764841#M37367</guid>
      <dc:creator>jec150</dc:creator>
      <dc:date>2021-08-30T14:04:26Z</dc:date>
    </item>
  </channel>
</rss>

