<?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: I want to write a macro code to run multiple univariate logistic regression models. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958544#M374101</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;ERROR: There is no matching %DO statement for the %END. This statement will be ignored.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Delete the duplicate %END statement.&lt;/P&gt;
&lt;PRE&gt;%end;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;%end;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;The %END statement of the outer %DO-%END block is already there, further below. Proper code indentation will make this clearly visible.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2025 14:37:28 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2025-02-06T14:37:28Z</dc:date>
    <item>
      <title>I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958492#M374077</link>
      <description>&lt;P&gt;I need to run over 30 univariate logistic regression models.&amp;nbsp; I want to make these codes using macro but whatever I do, it didn't produce the summary.&amp;nbsp; Can someone please help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Non-macro code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ods output OddsRatios = odds1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output ParameterEstimates = param1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;proc logistic data=base;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class sexc / param=ref ref=first;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model revasc6m (event='1') = sexc;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output OddsRatios = odds2;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output ParameterEstimates = param2;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;proc logistic data=base;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class ethnicityc / param=ref ref=first;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model revasc6m (event='1') = ethnicityc;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output OddsRatios = odds3;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output ParameterEstimates = param3;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;proc logistic data=base;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;model revasc6m (event='1') = age;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output OddsRatios = odds4;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;ods output ParameterEstimates = param4;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;proc logistic data=base;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;model revasc6m (event='1') = bmi;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; data combined_OR;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;set odds1 odds2 odds3 odds4;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; data combined_PA;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;set param1 param2 param3 param4;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Macro code I tried (the output file&amp;nbsp;_null_ has 0 case) :&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;BR /&gt;%macro univariate_logistic(data=, event=, vars=, class_vars=);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* Create a temporary table to store results */&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;length var_name $20;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* Check if there are any class variables */&lt;BR /&gt;%let has_class_vars = %length(&amp;amp;class_vars);&lt;BR /&gt;%if &amp;amp;has_class_vars &amp;gt; 0 %then %do;&lt;BR /&gt;&lt;BR /&gt;/* Run logistic regression for categorical variables */&lt;BR /&gt;%do i = 1 %to %sysfunc(countw(&amp;amp;class_vars));&lt;BR /&gt;%let var = %scan(&amp;amp;class_vars, &amp;amp;i);&lt;BR /&gt;proc logistic data=&amp;amp;data;&lt;BR /&gt;class &amp;amp;var / param=ref ref=last;&lt;BR /&gt;model &amp;amp;event (event='1') = &amp;amp;var;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%end;&lt;BR /&gt;&lt;BR /&gt;/* Run logistic regression for continuous variables */&lt;BR /&gt;%do i = 1 %to %sysfunc(countw(&amp;amp;vars));&lt;BR /&gt;%let var = %scan(&amp;amp;vars, &amp;amp;i);&lt;BR /&gt;proc logistic data=&amp;amp;data;&lt;BR /&gt;model &amp;amp;event (event='1') = &amp;amp;var;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;/* Append results to temporary table */&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;set _null_;&lt;BR /&gt;var_name = &amp;amp;var;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;/* Output final results table */&lt;/P&gt;
&lt;P&gt;proc print data=_null_;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%univariate_logistic(data=base, event=revasc6m, vars=age bmi ,&lt;BR /&gt;class_vars= sexc&amp;nbsp;ethnicityc&amp;nbsp;);&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Feb 2025 02:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958492#M374077</guid>
      <dc:creator>J_Park</dc:creator>
      <dc:date>2025-02-06T02:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958523#M374091</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for providing the code. When you say "&lt;SPAN&gt;it didn't produce the summary&lt;/SPAN&gt;", do you mean there was no output, or there was an issue in the log, or the output was incorrect, etc? Please clarify what you received vs what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try adding the following macro diagnostic statement before you invoke the macro again and post the log using the Insert Code icon "&amp;lt;/&amp;gt;":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint symbolgen;&lt;/CODE&gt;&lt;/PRE&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;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 10:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958523#M374091</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2025-02-06T10:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958525#M374092</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a rule, a DATA step of the form&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
...
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;does &lt;EM&gt;not&lt;/EM&gt; create an output dataset. So, using &lt;FONT face="courier new,courier"&gt;_null_&lt;/FONT&gt; later in a SET or PROC PRINT statement doesn't make sense as there is nothing to read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your non-macro code uses ODS OUTPUT statements. You can use them in your macro, too. Just insert&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output OddsRatios(persist=proc) = odds;
ods output ParameterEstimates(persist=proc) = param;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;at the beginning of the macro (after the %MACRO statement) and&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;at the end (before the %MEND statement). As a result, datasets ODDS and PARAM will contain the concatenated &lt;FONT face="courier new,courier"&gt;OddsRatios&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;ParameterEstimates&lt;/FONT&gt; outputs, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, consider using a %LOCAL statement in your macro (before the first %LET statement) to avoid unwanted side effects on macro variables outside of your macro:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%local has_class_vars i var;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Feb 2025 11:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958525#M374092</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-02-06T11:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958541#M374098</link>
      <description>Hello,&lt;BR /&gt;The typical sas results are there but the final result "proc print data=_null_;" was not created.&lt;BR /&gt;&lt;BR /&gt;This is the error message I got:&lt;BR /&gt;2828  /* Append results to temporary table */&lt;BR /&gt;2829&lt;BR /&gt;2830  data _null_;&lt;BR /&gt;2831  set _null_;&lt;BR /&gt;2832  var_name = &amp;amp;var;&lt;BR /&gt;2833  output;&lt;BR /&gt;2834  run;&lt;BR /&gt;2835&lt;BR /&gt;2836  %end;&lt;BR /&gt;ERROR: There is no matching %DO statement for the %END. This statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;Also it says: NOTE: Variable var_name is uninitialized.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958541#M374098</guid>
      <dc:creator>J_Park</dc:creator>
      <dc:date>2025-02-06T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958543#M374100</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;2836 %end;&lt;BR /&gt;ERROR: There is no matching %DO statement for the %END. This statement will be ignored.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So what %DO is this %END associated with? I don't see one, and SAS doesn't see one either&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your lack of output is explained by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;above.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958543#M374100</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-06T14:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958544#M374101</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;ERROR: There is no matching %DO statement for the %END. This statement will be ignored.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Delete the duplicate %END statement.&lt;/P&gt;
&lt;PRE&gt;%end;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;%end;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;The %END statement of the outer %DO-%END block is already there, further below. Proper code indentation will make this clearly visible.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958544#M374101</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-02-06T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958545#M374102</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;ERROR: There is no matching %DO statement for the %END. This statement will be ignored.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Delete the duplicate %END statement.&lt;/P&gt;
&lt;PRE&gt;%end;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;%end;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;The %END statement of the outer %DO-%END block is already there, further below. Proper code indentation will make this clearly visible.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think that's it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let has_class_vars = %length(&amp;amp;class_vars);
%if &amp;amp;has_class_vars &amp;gt; 0 %then &lt;FONT color="#339966"&gt;%do;&lt;/FONT&gt;

/* Run logistic regression for categorical variables */
&lt;FONT color="#FF0000"&gt;%do&lt;/FONT&gt; i = 1 %to %sysfunc(countw(&amp;amp;class_vars));
%let var = %scan(&amp;amp;class_vars, &amp;amp;i);
proc logistic data=&amp;amp;data;
class &amp;amp;var / param=ref ref=last;
model &amp;amp;event (event='1') = &amp;amp;var;
run;
&lt;FONT color="#FF0000"&gt;%end;&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;%end;
&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;There are two %DO and %END in this part of the code. The green %DO matches the green %END and the red %DO matches the red %END.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958545#M374102</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-06T14:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958548#M374105</link>
      <description>&lt;P&gt;I got this message:&lt;/P&gt;
&lt;P&gt;MPRINT(UNIVARIATE_LOGISTIC): data _null_;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): set _null_;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to bmi&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): var_name = bmi;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): output;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): run;&lt;/P&gt;
&lt;P&gt;NOTE: Variable bmi is uninitialized.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): proc print data=_null_;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): run;&lt;/P&gt;
&lt;P&gt;NOTE: No variables in data set WORK._NULL_.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 15:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958548#M374105</guid>
      <dc:creator>J_Park</dc:creator>
      <dc:date>2025-02-06T15:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958549#M374106</link>
      <description>&lt;P&gt;Oh yes, you're right, of course. The extraneous %END to be deleted is the one "further below" (between the nonsensical steps which are to be deleted as well).&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 15:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958549#M374106</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-02-06T15:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958550#M374107</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471748"&gt;@J_Park&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I got this message:&lt;/P&gt;
&lt;P&gt;MPRINT(UNIVARIATE_LOGISTIC): data _null_;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): set _null_;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to bmi&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): var_name = bmi;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): output;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): run;&lt;/P&gt;
&lt;P&gt;NOTE: Variable bmi is uninitialized.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): proc print data=_null_;&lt;BR /&gt;MPRINT(UNIVARIATE_LOGISTIC): run;&lt;/P&gt;
&lt;P&gt;NOTE: No variables in data set WORK._NULL_.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;From now on, please provide logs in the "Insert Code" window (the &amp;lt;/&amp;gt; icon), like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MPRINT(UNIVARIATE_LOGISTIC): data _null_;
MPRINT(UNIVARIATE_LOGISTIC): set _null_;
SYMBOLGEN: Macro variable VAR resolves to bmi
MPRINT(UNIVARIATE_LOGISTIC): var_name = bmi;
MPRINT(UNIVARIATE_LOGISTIC): output;
MPRINT(UNIVARIATE_LOGISTIC): run;

NOTE: Variable bmi is uninitialized.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


MPRINT(UNIVARIATE_LOGISTIC): proc print data=_null_;
MPRINT(UNIVARIATE_LOGISTIC): run;

NOTE: No variables in data set WORK._NULL_.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, this is telling you that the variable BMI does not have a value. Why? Because as stated above by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;there is NO DATA in a data set named _NULL_. You have to give some other name to this data set in order for data to be saved and used later in the program.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 15:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958550#M374107</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-06T15:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: I want to write a macro code to run multiple univariate logistic regression models.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958551#M374108</link>
      <description>&lt;P&gt;Hello FreelanceReinh!&lt;/P&gt;
&lt;P&gt;Your suggestion worked!!!!&amp;nbsp; &amp;nbsp;Amazing!&amp;nbsp; &amp;nbsp;I spent the whole day to try to figure this out.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much!&amp;nbsp; &amp;nbsp;I really appreciate your help.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 15:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-to-write-a-macro-code-to-run-multiple-univariate-logistic/m-p/958551#M374108</guid>
      <dc:creator>J_Park</dc:creator>
      <dc:date>2025-02-06T15:14:16Z</dc:date>
    </item>
  </channel>
</rss>

