<?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: Doing a SAS procedure within an array in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568950#M75186</link>
    <description>&lt;P&gt;So what I did was concatenate the text to trigger the macro for all the variables in my data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select cat('%mymacro(',name, ',', cats(name, '_new' ),')') into :renstr separated by ' ' from&lt;BR /&gt;dictionary.columns where libname = 'WORK' and memname='DATA';&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I just copied and pasted the result into my SAS code....&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 23:29:32 GMT</pubDate>
    <dc:creator>Melk</dc:creator>
    <dc:date>2019-06-25T23:29:32Z</dc:date>
    <item>
      <title>Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568938#M75181</link>
      <description>&lt;P&gt;I have a really large dataset that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;A B C -- ZZ A_new B_new C-new -- ZZ_new&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1 1 --&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to perform a test of agreement between all variables of the same name + the suffix&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=dat;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;table A*A_new / agree;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;table B*B_new / agree;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont think we can use an array to do a SAS procedure - but is there another way to do this without have to write down every variable name?&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 22:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568938#M75181</guid>
      <dc:creator>Melk</dc:creator>
      <dc:date>2019-06-25T22:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568939#M75182</link>
      <description>&lt;P&gt;Another importnat thing to note is that I only really care about p-values for the kappa statistics right now. Ideally, I could output to a dataset and then sort by p-value to get the variables that are significant.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 22:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568939#M75182</guid>
      <dc:creator>Melk</dc:creator>
      <dc:date>2019-06-25T22:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568940#M75183</link>
      <description>I would recommend transposing your data so you can use a BY statement instead.</description>
      <pubDate>Tue, 25 Jun 2019 22:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568940#M75183</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-25T22:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568943#M75185</link>
      <description>&lt;P&gt;so I converted to longitudinal, extra vairable being new = 1 or 0. Buy how do a get a kappa statistic with a by statement?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 22:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568943#M75185</guid>
      <dc:creator>Melk</dc:creator>
      <dc:date>2019-06-25T22:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568950#M75186</link>
      <description>&lt;P&gt;So what I did was concatenate the text to trigger the macro for all the variables in my data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select cat('%mymacro(',name, ',', cats(name, '_new' ),')') into :renstr separated by ' ' from&lt;BR /&gt;dictionary.columns where libname = 'WORK' and memname='DATA';&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I just copied and pasted the result into my SAS code....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 23:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568950#M75186</guid>
      <dc:creator>Melk</dc:creator>
      <dc:date>2019-06-25T23:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568965#M75187</link>
      <description>Or add CALL EXECUTE which would just call the string so you don't have to copy it and run it manually&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jun 2019 00:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568965#M75187</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-26T00:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a SAS procedure within an array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568966#M75188</link>
      <description>I would structure my data as:&lt;BR /&gt;&lt;BR /&gt;ID Code Old New&lt;BR /&gt;1 A 1 1&lt;BR /&gt;1 B 0 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;etc then do:&lt;BR /&gt;&lt;BR /&gt;proc freq data=have;&lt;BR /&gt;by code;&lt;BR /&gt;table old*new / agree ;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jun 2019 00:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Doing-a-SAS-procedure-within-an-array/m-p/568966#M75188</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-26T00:46:10Z</dc:date>
    </item>
  </channel>
</rss>

