<?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: Macro language question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938380#M368586</link>
    <description>&lt;P&gt;Make sure the dataset is sorted by PROJECT and then use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by project;
where project in (1 3 4 7 10 13 14);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Aug 2024 15:33:45 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-08-06T15:33:45Z</dc:date>
    <item>
      <title>Macro language question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938376#M368584</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a logistic regression program that I am using that contains a where clause. The where clause is used to to filter between a variable that has seven levels, they are 1, 3, 4, 7, 10, 13, and 14. I'd like to create a macro to go through this variable and run the logistic regression for each level, but I'm unsure as to how to go about it. Below is the logistic regression code with the where clause set to 1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
class v1(ref="3" param=ref) v2(ref="1" param=ref) v3(ref="3"
param=ref) v4(ref="White" param=ref) v5(ref="0" param=ref)
v6(ref="1" param=ref);
model dv(event="1")=v1 v2 v3 v4 v5 v6
where project = 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've tried doing %let project = (1, 3, 4, 7, 10, 13, 14) and having where project = &amp;amp;project but that gave me an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any resources to help or guide me along would be amazing, thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938376#M368584</guid>
      <dc:creator>mitrakos</dc:creator>
      <dc:date>2024-08-06T15:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro language question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938378#M368585</link>
      <description>&lt;P&gt;No macros needed. Replace the WHERE statement with a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by project;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In data set HAVE, remove any project numbers except&amp;nbsp;&lt;SPAN&gt;1, 3, 4, 7, 10, 13, 14&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938378#M368585</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-08-06T15:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro language question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938380#M368586</link>
      <description>&lt;P&gt;Make sure the dataset is sorted by PROJECT and then use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by project;
where project in (1 3 4 7 10 13 14);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938380#M368586</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-06T15:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro language question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938393#M368595</link>
      <description>Oh my god!! I was over thinking it, thank you so much!&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Aug 2024 17:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-language-question/m-p/938393#M368595</guid>
      <dc:creator>mitrakos</dc:creator>
      <dc:date>2024-08-06T17:01:04Z</dc:date>
    </item>
  </channel>
</rss>

