<?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: Error with Macro in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657466#M22610</link>
    <description>&lt;P&gt;You didn't end the ODS statement.&lt;/P&gt;
&lt;P&gt;Why do you have WHERE statement without any conditioned being specified?&amp;nbsp; Either remove it or give it an obviously true condition like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE 1=1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Jun 2020 12:16:04 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-06-11T12:16:04Z</dc:date>
    <item>
      <title>Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657431#M22600</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me what is wrong with this code?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = "/folders/myfolders/Research/Master List 07062020 SAS.xlsx" 
%macro logitc(resp=,event=,class=,ref=,where=);
proc logistic data=import plots(only)=roc(id=prob); 
where;
class &amp;amp;class(ref="&amp;amp;ref")/ param=ref;
model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl /*firth*/ rsquare;
/*exact "&amp;amp;class" &amp;amp;class / estimate=parm;*/
/*output out=outstats p=pred ;*/
run;
%mend;

%logitc(resp=Preg_Group,event=Miscarriage,class=BMI_cat,ref=19&amp;lt;=BMI&amp;lt;23,where=BMI_cat ^= 'BMI Other ');          /*0.*/
%logitc(resp=Preg_Group,event=Miscarriage,class=Age_cat,ref=Age &amp;lt;32) );          /*0.*/

%macro logitx(resp=,event=,x=,where=); 
proc logistic data=import plots(only)=roc(id=prob); 
where;
model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;x /link=logit outroc=roc cl /*firth*/ rsquare rocci;
run;
%mend;

%logitx(resp=Preg_Group,event=Miscarriage,x=BMI);            /*0.*/
%logitx(resp=Preg_Group,event=Miscarriage,x=Age);            /*0.*/

title 'Mult Logistic Reg ';
proc logistic data=import plots(only)=roc(id=prob); where BMI_cat ^= 'BMI Other ';
class Age_cat(ref='Age &amp;lt;32')/param=ref;
model Preg_Group(event="Miscarriage") = BMI Age_cat Prog_1
   /link=logit outroc=roc rsquare rocci cl/*nofit*/;
/*roc 'SIS '     SIS ;*/
/*roc 'Sex PoinSD2 Temp'     Gender Poincare_plot_SD2__ms_ Temperature_Reading__1_ ;*/
/*roccontrast 'Compare'/estimate=allpairs;*/
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74         ods excel file = "/folders/myfolders/Research/Master List 07062020 SAS.xlsx"
 75         %macro logitc(resp=,event=,class=,ref=,where=);
 76         proc logistic data=import plots(only)=roc(id=prob);
 77         where;
 78         class &amp;amp;class(ref="&amp;amp;ref")/ param=ref;
 79         model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl /*firth*/ rsquare;
 80         /*exact "&amp;amp;class" &amp;amp;class / estimate=parm;*/
 81         /*output out=outstats p=pred ;*/
 82         run;
 83         %mend;
 84         
 85         %logitc(resp=Preg_Group,event=Miscarriage,class=BMI_cat,ref=19&amp;lt;=BMI&amp;lt;23,where=BMI_cat ^= 'BMI Other ');          /*0.*/
 NOTE: Line generated by the invoked macro "LOGITC".
 85           proc logistic data=import plots(only)=roc(id=prob);  where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
              ____                                  ___ __
              22                                    22  22
              202                                   202 202
 85       ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 NOTE: Line generated by the invoked macro "LOGITC".
 85           proc logistic data=import plots(only)=roc(id=prob);  where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
                                                                   _____
                                                                   180
 85       ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 ERROR 22-322: Syntax error, expecting one of the following: ;, ANCHOR, AUTHOR, BOX_SIZING, CATEGORY, CLOSE, COMMENTS, CSSSTYLE, 
               DOM, DPI, FILE, GFOOTNOTE, GTITLE, IMAGE_DPI, KEYWORDS, NOGFOOTNOTE, NOGTITLE, OPTIONS, SASDATE, STATUS, STYLE, TEXT, 
               TITLE, WORK.  
 
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 NOTE: Line generated by the invoked macro "LOGITC".
 85           proc logistic data=import plots(only)=roc(id=prob);  where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
                                                                          _____
                                                                          180
 85       ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 
 NOTE: Line generated by the invoked macro "LOGITC".
 85           proc logistic data=import plots(only)=roc(id=prob);  where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
                                                                                                               _____
                                                                                                               180
 85       ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 
 86         %logitc(resp=Preg_Group,event=Miscarriage,class=Age_cat,ref=Age &amp;lt;32) );          /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 2 observations and 7 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.52 seconds
       cpu time            0.34 seconds
       
 
 180: LINE and COLUMN cannot be determined.
 NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 87         
 88         %macro logitx(resp=,event=,x=,where=);
 89         proc logistic data=import plots(only)=roc(id=prob);
 90         where;
 91         model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;x /link=logit outroc=roc cl /*firth*/ rsquare rocci;
 92         run;
 93         %mend;
 94         
 95         %logitx(resp=Preg_Group,event=Miscarriage,x=BMI);            /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 98 observations and 8 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.50 seconds
       cpu time            0.25 seconds
       
 
 96         %logitx(resp=Preg_Group,event=Miscarriage,x=Age);            /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 18 observations and 8 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.40 seconds
       cpu time            0.23 seconds
       
 
 97         
 98         title 'Mult Logistic Reg ';
 99         proc logistic data=import plots(only)=roc(id=prob); where BMI_cat ^= 'BMI Other ';
 100        class Age_cat(ref='Age &amp;lt;32')/param=ref;
 101        model Preg_Group(event="Miscarriage") = BMI Age_cat Prog_1
 102           /link=logit outroc=roc rsquare rocci cl/*nofit*/;
 103        /*roc 'SIS '     SIS ;*/
 104        /*roc 'Sex PoinSD2 Temp'     Gender Poincare_plot_SD2__ms_ Temperature_Reading__1_ ;*/
 105        /*roccontrast 'Compare'/estimate=allpairs;*/
 106        run;
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 61 observations read from the data set WORK.IMPORT.
       WHERE BMI_cat not = 'BMI Other ';
 NOTE: The data set WORK.ROC has 61 observations and 8 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.47 seconds
       cpu time            0.28 seconds
       
 
 107        
 108        
 109        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 121        &lt;/PRE&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657431#M22600</guid>
      <dc:creator>duckypooh</dc:creator>
      <dc:date>2020-06-11T11:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657437#M22601</link>
      <description>&lt;P&gt;Examine your code very very very carefully. One of your commands does not end with a semi-colon.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657437#M22601</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-11T11:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657442#M22602</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for spotting it! I have rectified that line but the error still persists..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657442#M22602</guid>
      <dc:creator>duckypooh</dc:creator>
      <dc:date>2020-06-11T11:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657459#M22605</link>
      <description>&lt;P&gt;Show us the log after you have fixed the missing semi-colon.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657459#M22605</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-11T11:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657464#M22609</link>
      <description>I think you should change 'where;'&lt;BR /&gt;&lt;BR /&gt;proc logistic data=import plots(only)=roc(id=prob); &lt;BR /&gt;where;&lt;BR /&gt;&lt;BR /&gt;---&amp;gt;&lt;BR /&gt;proc logistic data=import plots(only)=roc(id=prob); &lt;BR /&gt;%if %length(&amp;amp;where) %then %do;  where  &amp;amp;where ; %end;&lt;BR /&gt;&lt;BR /&gt;otherwise delete 'where;' .</description>
      <pubDate>Thu, 11 Jun 2020 12:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657464#M22609</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-11T12:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657466#M22610</link>
      <description>&lt;P&gt;You didn't end the ODS statement.&lt;/P&gt;
&lt;P&gt;Why do you have WHERE statement without any conditioned being specified?&amp;nbsp; Either remove it or give it an obviously true condition like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE 1=1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2020 12:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657466#M22610</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-11T12:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657490#M22614</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the log after adding the missing ;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74         libname mc '/folders/myfolders/research';
 NOTE: Libref MC was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /folders/myfolders/research
 75         
 76         proc import out= mc.complieddata datafile= "/folders/myfolders/Research/Master List 07062020 SAS.xlsx"
 77         DBMS=xlsx Replace;
 77       !                    SHEET="Data Complied From Both Studies";
 78         GETNAMES=YES;
 79         RUN;
 
 NOTE:    Variable Name Change.  Preg Group -&amp;gt; Preg_Group                      
 NOTE:    Variable Name Change.  Subject number -&amp;gt; Subject_number                  
 NOTE:    Variable Name Change.  Progestrone nmol/L -&amp;gt; Progestrone_nmol_L              
 NOTE:    Variable Name Change.  Screen/Incl/Excl -&amp;gt; Screen_Incl_Excl                
 NOTE:    Variable Name Change.  Enrollment Date -&amp;gt; Enrollment_Date                 
 NOTE:    Variable Name Change.  GA in weeks -&amp;gt; GA_in_weeks                     
 NOTE:    Variable Name Change.  F/U Date 16th Wk -&amp;gt; F_U_Date_16th_Wk                
 NOTE:    Variable Name Change.  F/U Date 40th Wk -&amp;gt; F_U_Date_40th_Wk                
 NOTE:    Variable Name Change.  16 week miscarriage -&amp;gt; _16_week_miscarriage            
 NOTE:    Variable Name Change.  40 week miscarriage -&amp;gt; _40_week_miscarriage            
 NOTE:    Variable Name Change.  Chromosomal Aberration (Y/N) -&amp;gt; VAR20                           
 NOTE:    Variable Name Change.  Chromosomal Aberration (Descript -&amp;gt; Chromosomal_Aberration__Descript
 NOTE:    Variable Name Change.  Threatened Miscarriage (Y/N) -&amp;gt; VAR22                           
 NOTE:    Variable Name Change.  Spontaneous Miscarriage (Y/N) -&amp;gt; VAR23                           
 NOTE:    Variable Name Change.  IUGS &amp;amp; YS (Y/N) -&amp;gt; VAR24                           
 NOTE:    Variable Name Change.  Completed? -&amp;gt; Completed_                      
 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with 
       options MSGLEVEL=I.
 NOTE: The import data set has 168 observations and 27 variables.
 NOTE: MC.COMPLIEDDATA data set was successfully created.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.21 seconds
       cpu time            0.14 seconds
       
 
 80         
 81         data import; set research.import;
 82         
 83         if Preg_Group in ('Miscarriage' 'Normal');
 84         
 85              if BMI &amp;gt;28        then BMI_cat = 'BMI &amp;gt;28   ';
 86         else if 19 &amp;lt;= BMI &amp;lt; 23 then BMI_cat = '19&amp;lt;=BMI&amp;lt;23';
 87         else                        BMI_cat = 'BMI Other ';
 88         
 89              if Age &amp;lt;32   then Age_cat = 'Age &amp;lt;32 ';
 90         else if Age &amp;gt;= 32 then Age_cat = 'Age &amp;gt;=32';
 91         
 92         ln_Progestrone = log(Prog_1);
 93         
 94         run;
 
 NOTE: There were 168 observations read from the data set RESEARCH.IMPORT.
 NOTE: The data set WORK.IMPORT has 114 observations and 30 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 95         
 96         title 'Cross tabulation on BMI and Age category groups';
 97         proc freq data=import; tables BMI_cat*Preg_Group/fisher; where BMI_cat ^= 'BMI Other '; run;
 
 NOTE: There were 61 observations read from the data set WORK.IMPORT.
       WHERE BMI_cat not = 'BMI Other ';
 NOTE: PROCEDURE FREQ used (Total process time):
       real time           0.32 seconds
       cpu time            0.30 seconds
       
 
 98         proc freq data=import; tables Age_cat*Preg_Group/fisher;  run;
 
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: PROCEDURE FREQ used (Total process time):
       real time           0.21 seconds
       cpu time            0.19 seconds
       
 
 99         
 100        
 101        run;
 102        
 103        title 'Summary statistics';
 104        proc means data=import ndec=2 n mean std median p25 p75 min max; var  Age GA_1 BMI;  run;
 
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: PROCEDURE MEANS used (Total process time):
       real time           0.16 seconds
       cpu time            0.15 seconds
       
 
 105        
 106        title '2-sample t-test ';
 107        proc ttest data=import; var Prog_1 ln_Progestrone; class Preg_Group; run;
 
 NOTE: PROCEDURE TTEST used (Total process time):
       real time           3.81 seconds
       cpu time            1.94 seconds
       
 
 108        
 109        title 'Wilcoxon test rank sum test';
 110        title 'Summary statistics';
 111        proc means data=import ndec=2 n mean std median p25 p75 min max; var  Age  GA_1 BMI;  run;
 
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: PROCEDURE MEANS used (Total process time):
       real time           0.15 seconds
       cpu time            0.14 seconds
       
 
 112        
 113        title;
 114        proc npar1way  data=import anova wilcoxon dscf plots(only)=anovaboxplot;
 115        var BMI Age Prog_1 ; class Preg_Group; run;
 
 NOTE: DSCF multiple comparison analysis is available only when there are more than two CLASS levels.
 NOTE: PROCEDURE NPAR1WAY used (Total process time):
       real time           1.46 seconds
       cpu time            0.86 seconds
       
 
 116        
 117        
 118        
 119        ods rtf file= "/folders/myfolders/Research/Master List 07062020 SAS.xlsx"
 120        
 121        %macro logitc(resp=,event=,class=,ref=,where=);
 122        proc logistic data=import plots(only)=roc(id=prob);
 123        &amp;amp;where;
 124        class &amp;amp;class(ref="&amp;amp;ref")/ param=ref;
 125        model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl /*firth*/ rsquare;
 126        /*exact "&amp;amp;class" &amp;amp;class / estimate=parm;*/
 127        /*output out=outstats p=pred ;*/
 128        run;
 129        %mend;
 130        
 131        %logitc(resp=Preg_Group,event=Miscarriage,class=BMI_cat,ref=19&amp;lt;=BMI&amp;lt;23,where=BMI_cat ^= 'BMI Other ');          /*0.*/
 NOTE: Line generated by the invoked macro "LOGITC".
 131          proc logistic data=import plots(only)=roc(id=prob);  &amp;amp;where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
              ____                            ____
              22                              22
              202                             76
 131      ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 NOTE: Line generated by the macro variable "WHERE".
 131          BMI_cat ^= 'BMI Other '
              _______
              180
 
 ERROR 22-322: Syntax error, expecting one of the following: ;, ANCHOR, AUTHOR, BASE, BODY, BOOKMARK, BOX_SIZING, CHARSET, CLOSE, 
               COLUMNS, CONTENTS, CSSSTYLE, DATAPANEL, DOM, DPI, ENCODING, FILE, FONTSCALE, GFOOTNOTE, GTITLE, HOST, IMAGE_DPI, 
               KEEPN, LSTPIPE, NEWFILE, NOCONTENTS, NOGFOOTNOTE, NOGTITLE, NOKEEPN, NOLSTPIPE, NOOUTLINE, NOTRKEEP, OPERATOR, 
               OUTLINE, PACKAGE, PATH, RECORD_SEPARATOR, SAS, SASDATE, SGE, STARTPAGE, STYLE, TEXT, TITLE, TRANTAB, TRKEEP.  
 
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 
 ERROR 76-322: Syntax error, statement will be ignored.
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 NOTE: Line generated by the invoked macro "LOGITC".
 131          proc logistic data=import plots(only)=roc(id=prob);  &amp;amp;where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
                                                                           _____
                                                                           180
 131      ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 
 NOTE: Line generated by the invoked macro "LOGITC".
 131          proc logistic data=import plots(only)=roc(id=prob);  &amp;amp;where; class &amp;amp;class(ref="&amp;amp;ref")/ param=ref; model
                                                                                                                _____
                                                                                                                180
 131      ! &amp;amp;resp(event="&amp;amp;event") = &amp;amp;class /link=logit outroc=roc cl  rsquare;   run;
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 
 132        %logitc(resp=Preg_Group,event=Miscarriage,class=Age_cat,ref=Age &amp;lt;32);          /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 2 observations and 7 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.79 seconds
       cpu time            0.50 seconds
       
 
 133        
 134        %macro logitx(resp=,event=,x=,where=);
 135        proc logistic data=import plots(only)=roc(id=prob);
 136        &amp;amp;where;
 137        model &amp;amp;resp(event="&amp;amp;event") = &amp;amp;x /link=logit outroc=roc cl /*firth*/ rsquare rocci;
 138        run;
 139        %mend;
 140        
 141        %logitx(resp=Preg_Group,event=Miscarriage,x=BMI);            /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 98 observations and 8 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.69 seconds
       cpu time            0.39 seconds
       
 
 142        %logitx(resp=Preg_Group,event=Miscarriage,x=Age);            /*0.*/
 
 NOTE: PROC LOGISTIC is modeling the probability that Preg_Group='Miscarriage'.
 NOTE: Convergence criterion (GCONV=1E-8) satisfied.
 NOTE: There were 114 observations read from the data set WORK.IMPORT.
 NOTE: The data set WORK.ROC has 18 observations and 8 variables.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.63 seconds
       cpu time            0.39 seconds
       
 
 143        
 144        title 'Mult Logistic Reg ';
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 NOTE: The SAS System stopped processing this step because of errors.
 145        proc logistic data=import plots(only)=roc(id=prob); where BMI_cat ^= 'BMI Other ';
 146        class Age_cat(ref='Age &amp;lt;32')/param=ref;
 147        model Preg_Group(event="Miscarriage") = BMI Age_cat Prog_1;
 148           /link=logit outroc=roc rsquare rocci cl/*nofit*/;
               _
               180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 149        /*roc 'SIS '     SIS ;*/
 150        /*roc 'Sex PoinSD2 Temp'     Gender Poincare_plot_SD2__ms_ Temperature_Reading__1_ ;*/
 151        /*roccontrast 'Compare'/estimate=allpairs;*/
 152        run;
 153        
 154        
 155        
 156        
 157        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 169        &lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2020 12:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657490#M22614</guid>
      <dc:creator>duckypooh</dc:creator>
      <dc:date>2020-06-11T12:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657514#M22616</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Your ODS RTF statement is still missing the semicolon. FIX THAT FIRST.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 13:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-with-Macro/m-p/657514#M22616</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-11T13:33:21Z</dc:date>
    </item>
  </channel>
</rss>

