<?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: Proc Logisitic result not include ordinal variables in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110937#M603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have specified the variables with an N prefix in the CLASS statement but not as independent variables in the MODEL statement.&lt;/P&gt;&lt;P&gt;PROC LOGISTIC will select only independent variables from the MODEL statement so that it will not select any of the N-prefix variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also state that the N-prefix variables are ordinal variables but provide as examples only nominal variables (nationality, sex).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, you should not perform principal components analysis or factor analysis on nominal variables but preferably only on interval/ratio/continuous variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference coding is preferred to effect coding in the PROC LOGISTIC CLASS statement because the former is easier to translate into measures of effect (like odds ratios) than the latter.&amp;nbsp; Variable selection in regression procedures has been discussed previously in this forum and is somewhat problematic.&amp;nbsp; Preferable would be some of the methods in PROC GLMSELECT, even though these methods are not optimized for dichotomous dependent variables like those used in logistic regression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jan 2013 13:08:14 GMT</pubDate>
    <dc:creator>1zmm</dc:creator>
    <dc:date>2013-01-02T13:08:14Z</dc:date>
    <item>
      <title>Proc Logisitic result not include ordinal variables</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110936#M602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear all,&lt;/P&gt;&lt;P&gt;Here's the code.&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;proc logistic data=slide.sb_vm_training outmodel=slide.model;&lt;/P&gt;&lt;P&gt;CLASS N2&amp;nbsp; N3&amp;nbsp; N4&amp;nbsp; N5&amp;nbsp; N6&amp;nbsp; N7&amp;nbsp; N10&amp;nbsp; N11&amp;nbsp; N12&amp;nbsp; N13 /param=ref;&lt;/P&gt;&lt;P&gt;model dv = Prin1 Prin2 Prin3&amp;nbsp; factor1 factor2 factor3 factor4 factor5 factor6 factor7 factor8 /selection=stepwise ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;proc logistic data=slide.sb_vm_training outmodel=slide.model;&lt;/P&gt;&lt;P&gt;CLASS N2&amp;nbsp; N3&amp;nbsp; N4&amp;nbsp; N5&amp;nbsp; N6&amp;nbsp; N7&amp;nbsp; N10&amp;nbsp; N11&amp;nbsp; N12&amp;nbsp; N13 /param=&lt;SPAN style="text-decoration: underline;"&gt;effect&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;model dv = Prin1 Prin2 Prin3&amp;nbsp; factor1 factor2 factor3 factor4 factor5 factor6 factor7 factor8 /selection=stepwise ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;proc logistic data=slide.sb_vm_training outmodel=slide.model;&lt;/P&gt;&lt;P&gt;CLASS N2&amp;nbsp; N3&amp;nbsp; N4&amp;nbsp; N5&amp;nbsp; N6&amp;nbsp; N7&amp;nbsp; N10&amp;nbsp; N11&amp;nbsp; N12&amp;nbsp; N13 /param=ref;&lt;/P&gt;&lt;P&gt;model dv = Prin1 Prin2 Prin3&amp;nbsp; factor1 factor2 factor3 factor4 factor5 factor6 factor7 factor8 /selection=stepwise ;&lt;/P&gt;&lt;P&gt;unit Prin1=Prin1&amp;nbsp; =50000 Prin2&amp;nbsp; =50000 Prin3&amp;nbsp; =50000&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I tried the 3 different coding as above, but all failed to get a N variable into the model&lt;/P&gt;&lt;P&gt;Where variables with prefix "N" are ordinal variables like nationality,sex,most of them with the scope (0,9)&lt;/P&gt;&lt;P&gt;Prin1-prin3 are variables extracted from principal analysis,the scope for this variable is between (-Million,+Million)&lt;/P&gt;&lt;P&gt;factor1-factor8 are variables extracted from factor analysis,the scope for this variable is between (-2,+2)&lt;/P&gt;&lt;P&gt;both of them are summary of continous variables in some way,&lt;/P&gt;&lt;P&gt;dv is the dependent variable , with 1 shows the customer will leave, and 0 shows he will stay.&lt;/P&gt;&lt;P&gt;The question is when using stepwise, only prin1 and some factor variables remains, not even one N variable remains.&lt;/P&gt;&lt;P&gt;while judge from the real business, at least nationality is very useful to determine whether a customer will leave,&lt;/P&gt;&lt;P&gt;WHY not even one N variable remains?&lt;/P&gt;&lt;P&gt;what's wrong with my coding for Proc Logistic?&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;Dawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2012 03:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110936#M602</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-12-31T03:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logisitic result not include ordinal variables</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110937#M603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have specified the variables with an N prefix in the CLASS statement but not as independent variables in the MODEL statement.&lt;/P&gt;&lt;P&gt;PROC LOGISTIC will select only independent variables from the MODEL statement so that it will not select any of the N-prefix variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also state that the N-prefix variables are ordinal variables but provide as examples only nominal variables (nationality, sex).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, you should not perform principal components analysis or factor analysis on nominal variables but preferably only on interval/ratio/continuous variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference coding is preferred to effect coding in the PROC LOGISTIC CLASS statement because the former is easier to translate into measures of effect (like odds ratios) than the latter.&amp;nbsp; Variable selection in regression procedures has been discussed previously in this forum and is somewhat problematic.&amp;nbsp; Preferable would be some of the methods in PROC GLMSELECT, even though these methods are not optimized for dichotomous dependent variables like those used in logistic regression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 13:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110937#M603</guid>
      <dc:creator>1zmm</dc:creator>
      <dc:date>2013-01-02T13:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logisitic result not include ordinal variables</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110938#M604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;1zmm,&lt;/P&gt;&lt;P&gt;Thx for your patient explanation.&lt;/P&gt;&lt;P&gt;Yes that variables with N-prefix are nominal variables,&lt;/P&gt;&lt;P&gt;those Prin and factor variables are generated from continuous variables only.&lt;/P&gt;&lt;P&gt;After I raised this question, I looked around the community, to find that proc logistic combined with class defining is not recommended, they suggest glmselect as you said.&lt;/P&gt;&lt;P&gt;I have one more question,can you take time to reply it?&lt;/P&gt;&lt;P&gt;When i used the following code (45 continuous variables)&lt;/P&gt;&lt;P&gt;proc princomp data=slide.sb_vm10 cov outstat=temp_prin1;&lt;/P&gt;&lt;P&gt;var&amp;nbsp; c1-c45;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;for eg variables A with large scope is within (-1M,1M),variables B with small scope&amp;nbsp; is within (-1,1),&lt;/P&gt;&lt;P&gt;it seems that the coefficient for Eigenvectors like prin1 will be Zero for those variables B.&lt;/P&gt;&lt;P&gt;Do u know in mind how to deal with such things?&lt;/P&gt;&lt;P&gt;Thx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 07:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110938#M604</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2013-01-04T07:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logisitic result not include ordinal variables</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110939#M605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course the coefficient is zero, or nearly so.&amp;nbsp; Variable A explains almost all of the total variation, so the amount of variation left for Variable B is negligible.&amp;nbsp; If you look at the eigenvalues associated with the vectors this should be apparent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question comes down to RELATIVE variability, so perhaps rescaling would help.&amp;nbsp; Not normalizing, as that will remove differences in variability.&amp;nbsp; Just putting things on the same scale will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I don't really know how you intend to use the results in forecasting a timeseries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 12:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110939#M605</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-01-04T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logisitic result not include ordinal variables</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110940#M606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Glad I see your recommend&amp;nbsp; ,"not Normalizing" but just "rescaling", I was just to normalizing.You saved me.Thanks&lt;/P&gt;&lt;P&gt;Dawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jan 2013 01:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-Logisitic-result-not-include-ordinal-variables/m-p/110940#M606</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2013-01-05T01:10:13Z</dc:date>
    </item>
  </channel>
</rss>

