<?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 Obtaining AIC and BIC for model selection- logistic regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-AIC-and-BIC-for-model-selection-logistic-regression/m-p/905889#M45024</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this code to obtain the table with all possible models and their respective AIC/BIC:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc logistic data=pred3_num;
class x5 x7 x8;
model I_y(ref='0') = x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14 
x15 x151 x152 /
selection=score best=1;
run;
%MACRO logistic_aic_sbc_score(yvariable=I_y,xvariables=x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14 
x15 x151 x152,dataset=pred3_num,minvar=1,maxvar=42); &lt;/PRE&gt;&lt;P&gt;But the log message here is giving me a few errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 2          TITLE;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 6          RUN;
 7          OPTIONS VALIDVARNAME=ANY;
 8          OPTIONS VALIDMEMNAME=EXTEND;
 74         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
                          _________________
                          49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 9          FILENAME _HTMLOUT TEMP;
 10         FILENAME _GSFNAME TEMP;
 11         FILENAME _DATAOUT TEMP;
 12         %LET SYSCC=0;
 13         %LET _CLIENTAPP='SAS Studio';
 14         %LET _CLIENTAPPABREV=Studio;
 15         %LET _CLIENTAPPVERSION=3.81;
 16         %LET _CLIENTVERSION=3.81;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 17         %LET _CLIENTMODE=wip;
 18         %LET _SASSERVERNAME=%BQUOTE(SASApp);
 19         %LET _SASHOSTNAME=%BQUOTE(odaws02-usw2-2);
 20         %LET _SASPROGRAMFILEHOST=%BQUOTE(odaws02-usw2-2);
 21         %LET _CLIENTUSERID=%BQUOTE(u63584079);
 22         %LET _CLIENTUSERNAME=%BQUOTE(u63584079);
 23         %LET CLIENTMACHINE=%BQUOTE(MODEMCABLE061.63-179-173.MC.VIDEOTRON.CA);
 24         %LET _CLIENTMACHINE=%BQUOTE(MODEMCABLE061.63-179-173.MC.VIDEOTRON.CA);
 25         %let SASWORKLOCATION="%sysfunc(getoption(work))/";
 26         FILENAME _CWD '.'
                            _
                            49
 26       ! ;
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 27         DATA _NULL_;
 28         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                       ____________
                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 29         RUN;
 30         FILENAME _CWD;
 31         
 32         %LET _SASPROGRAMFILE = %NRQUOTE(%NRSTR(/home/u63584079/sasuser.v94/Ps2_draft.sas));
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 33         %LET _BASEURL = %BQUOTE(https://odamid-usw2-2.oda.sas.com/SASStudio/);
 28         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                                       ____
                                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 34         %LET _EXECENV=SASStudio;
 35         DATA _NULL_;
 36         CALL SYMPUT("GRAPHINIT","");
 37         CALL SYMPUT("GRAPHTERM","");
 38         RC=TSLVL('SASXGOPT','N');
 39         _ERROR_=0;
 40         IF (RC^=' ') THEN DO;
 41         CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;");
 42         CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;");
 43         END;
 44         RUN;
 45         DATA _NULL_;
 46         RC=SYSPROD("PRODNUM002");
 47         IF (RC^=1) THEN DO;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 48         CALL SYMPUT("GRAPHINIT","");
 49         CALL SYMPUT("GRAPHTERM","");
 50         END;
 51         RUN;
 52         %LET _DATAOUT_MIME_TYPE=;
 53         %LET _DATAOUT_NAME=;
 54         %LET _DATAOUT_TABLE=;
 55         %LET _DATAOUT_URL=;
 56         %SYMDEL _DATAOUT_MIME_TYPE _DATAOUT_NAME _DATAOUT_URL _DATAOUT_TABLE;
 57         %LET _SASWS_ = %BQUOTE(/home/u63584079);
 40         IF (RC^=' ') THEN DO;
                      ___________
                      49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 58         %LET _SASWSTEMP_=%BQUOTE(/home/u63584079/.sasstudio/.images/6857b072-c60b-4db4-9863-5f24234a4f61);
 59         ODS LISTING CLOSE;
 60         ODS AUTONAVIGATE OFF;
 61         ODS GRAPHICS ON;
 62         ODS HTML5 (ID=WEB) DEVICE=PNG GPATH="&amp;amp;_SASWSTEMP_" ENCODING=utf8  FILE=_HTMLOUT (TITLE='Results:
 62       ! Ps2_draft.sas') STYLE=Htmlblue OPTIONS(BITMAP_MODE='INLINE' OUTLINE='ON' SVG_MODE='INLINE'
                         _______________________________________      ___________  ____________
                         49                                           49           49
 62       ! CSS_PREFIX='.ods_6857b072-c60b-4db4-9863-5f24234a4f61' BODY_ID='div_6857b072-c60b-4db4-9863-5f24234a4f61' );
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 63         &amp;amp;GRAPHINIT;
 64         OPTIONS FIRSTOBS=1;
 65         OPTIONS OBS=MAX;
 66         OPTIONS DTRESET DATE NUMBER NOTES;
 67         OPTIONS NOTES STIMER SOURCE NOSYNTAXCHECK;
 68         
 69         proc logistic data=pred3_num;
 70         class x5 x7 x8;
 71         model I_y(ref='0') = x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113
 71       ! x114 x115 x116 x117 x118 x119 xx11 x12-x14
 49: 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.
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 72         x15 x151 x152 /
 73         selection=score best=1;
 74         run;
 75         %MACRO logistic_aic_sbc_score(yvariable=I_y,xvariables=x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42
 75       ! x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14
 76         x15 x151 x152,dataset=pred3_num,minvar=1,maxvar=42);
 77         
 78         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 79         ODS HTML CLOSE;
 80         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
 81         QUIT;RUN;
 82         ODS HTML5 (ID=WEB) CLOSE;
 83         
 84         FILENAME _GSFNAME;
 85         DATA _NULL_;
 86         RUN;
 87         OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 88         
 User: u63584079&lt;/PRE&gt;&lt;P&gt;And the output was only giving me a table with chi-squares as metrics of selection&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Dec 2023 15:36:52 GMT</pubDate>
    <dc:creator>SIMMII</dc:creator>
    <dc:date>2023-12-03T15:36:52Z</dc:date>
    <item>
      <title>Obtaining AIC and BIC for model selection- logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-AIC-and-BIC-for-model-selection-logistic-regression/m-p/905889#M45024</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this code to obtain the table with all possible models and their respective AIC/BIC:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc logistic data=pred3_num;
class x5 x7 x8;
model I_y(ref='0') = x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14 
x15 x151 x152 /
selection=score best=1;
run;
%MACRO logistic_aic_sbc_score(yvariable=I_y,xvariables=x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14 
x15 x151 x152,dataset=pred3_num,minvar=1,maxvar=42); &lt;/PRE&gt;&lt;P&gt;But the log message here is giving me a few errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 2          TITLE;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 6          RUN;
 7          OPTIONS VALIDVARNAME=ANY;
 8          OPTIONS VALIDMEMNAME=EXTEND;
 74         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
                          _________________
                          49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 9          FILENAME _HTMLOUT TEMP;
 10         FILENAME _GSFNAME TEMP;
 11         FILENAME _DATAOUT TEMP;
 12         %LET SYSCC=0;
 13         %LET _CLIENTAPP='SAS Studio';
 14         %LET _CLIENTAPPABREV=Studio;
 15         %LET _CLIENTAPPVERSION=3.81;
 16         %LET _CLIENTVERSION=3.81;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 17         %LET _CLIENTMODE=wip;
 18         %LET _SASSERVERNAME=%BQUOTE(SASApp);
 19         %LET _SASHOSTNAME=%BQUOTE(odaws02-usw2-2);
 20         %LET _SASPROGRAMFILEHOST=%BQUOTE(odaws02-usw2-2);
 21         %LET _CLIENTUSERID=%BQUOTE(u63584079);
 22         %LET _CLIENTUSERNAME=%BQUOTE(u63584079);
 23         %LET CLIENTMACHINE=%BQUOTE(MODEMCABLE061.63-179-173.MC.VIDEOTRON.CA);
 24         %LET _CLIENTMACHINE=%BQUOTE(MODEMCABLE061.63-179-173.MC.VIDEOTRON.CA);
 25         %let SASWORKLOCATION="%sysfunc(getoption(work))/";
 26         FILENAME _CWD '.'
                            _
                            49
 26       ! ;
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 27         DATA _NULL_;
 28         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                       ____________
                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 29         RUN;
 30         FILENAME _CWD;
 31         
 32         %LET _SASPROGRAMFILE = %NRQUOTE(%NRSTR(/home/u63584079/sasuser.v94/Ps2_draft.sas));
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 33         %LET _BASEURL = %BQUOTE(https://odamid-usw2-2.oda.sas.com/SASStudio/);
 28         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                                       ____
                                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 34         %LET _EXECENV=SASStudio;
 35         DATA _NULL_;
 36         CALL SYMPUT("GRAPHINIT","");
 37         CALL SYMPUT("GRAPHTERM","");
 38         RC=TSLVL('SASXGOPT','N');
 39         _ERROR_=0;
 40         IF (RC^=' ') THEN DO;
 41         CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;");
 42         CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;");
 43         END;
 44         RUN;
 45         DATA _NULL_;
 46         RC=SYSPROD("PRODNUM002");
 47         IF (RC^=1) THEN DO;
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 48         CALL SYMPUT("GRAPHINIT","");
 49         CALL SYMPUT("GRAPHTERM","");
 50         END;
 51         RUN;
 52         %LET _DATAOUT_MIME_TYPE=;
 53         %LET _DATAOUT_NAME=;
 54         %LET _DATAOUT_TABLE=;
 55         %LET _DATAOUT_URL=;
 56         %SYMDEL _DATAOUT_MIME_TYPE _DATAOUT_NAME _DATAOUT_URL _DATAOUT_TABLE;
 57         %LET _SASWS_ = %BQUOTE(/home/u63584079);
 40         IF (RC^=' ') THEN DO;
                      ___________
                      49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 
 58         %LET _SASWSTEMP_=%BQUOTE(/home/u63584079/.sasstudio/.images/6857b072-c60b-4db4-9863-5f24234a4f61);
 59         ODS LISTING CLOSE;
 60         ODS AUTONAVIGATE OFF;
 61         ODS GRAPHICS ON;
 62         ODS HTML5 (ID=WEB) DEVICE=PNG GPATH="&amp;amp;_SASWSTEMP_" ENCODING=utf8  FILE=_HTMLOUT (TITLE='Results:
 62       ! Ps2_draft.sas') STYLE=Htmlblue OPTIONS(BITMAP_MODE='INLINE' OUTLINE='ON' SVG_MODE='INLINE'
                         _______________________________________      ___________  ____________
                         49                                           49           49
 62       ! CSS_PREFIX='.ods_6857b072-c60b-4db4-9863-5f24234a4f61' BODY_ID='div_6857b072-c60b-4db4-9863-5f24234a4f61' );
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 63         &amp;amp;GRAPHINIT;
 64         OPTIONS FIRSTOBS=1;
 65         OPTIONS OBS=MAX;
 66         OPTIONS DTRESET DATE NUMBER NOTES;
 67         OPTIONS NOTES STIMER SOURCE NOSYNTAXCHECK;
 68         
 69         proc logistic data=pred3_num;
 70         class x5 x7 x8;
 71         model I_y(ref='0') = x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42 x5-x8 x9 x91 x10 x11 x111 x112 x113
 71       ! x114 x115 x116 x117 x118 x119 xx11 x12-x14
 49: 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.
 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
              between a quoted string and the succeeding identifier is recommended.
 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 72         x15 x151 x152 /
 73         selection=score best=1;
 74         run;
 75         %MACRO logistic_aic_sbc_score(yvariable=I_y,xvariables=x1 x2 x21 x22 x23 x24 x25 x26 x27 x28 x29 xx2 x3 x31 x4 x41 x42
 75       ! x5-x8 x9 x91 x10 x11 x111 x112 x113 x114 x115 x116 x117 x118 x119 xx11 x12-x14
 76         x15 x151 x152,dataset=pred3_num,minvar=1,maxvar=42);
 77         
 78         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 79         ODS HTML CLOSE;
 80         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
 81         QUIT;RUN;
 82         ODS HTML5 (ID=WEB) CLOSE;
 83         
 84         FILENAME _GSFNAME;
 85         DATA _NULL_;
 86         RUN;
 87         OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 88         
 User: u63584079&lt;/PRE&gt;&lt;P&gt;And the output was only giving me a table with chi-squares as metrics of selection&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-AIC-and-BIC-for-model-selection-logistic-regression/m-p/905889#M45024</guid>
      <dc:creator>SIMMII</dc:creator>
      <dc:date>2023-12-03T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining AIC and BIC for model selection- logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-AIC-and-BIC-for-model-selection-logistic-regression/m-p/906806#M45035</link>
      <description>&lt;P&gt;Save your code and data. then restart SAS, or disconnect and reconnect SAS Studio. At some point, it looks like you have an unmatched single or double quote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what you posted, it also looks to me like you called a macro named logistic_aic_sbc_score. The unbalanced quote may be in that macro..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 18:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-AIC-and-BIC-for-model-selection-logistic-regression/m-p/906806#M45035</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-07T18:54:19Z</dc:date>
    </item>
  </channel>
</rss>

