<?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: Using GLMSELECT for explanatory variables with &amp;gt;2 levels. Model building and interpreting res in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672252#M202001</link>
    <description>&lt;P&gt;1. &amp;nbsp;No I do not think your code does what you intend, though it is correct, syntax wise. I think you want the REF and PARAM option on the CLASS statement for starters. Otherwise the default is GLM and you should check the design matrix which is outputted to see how it’s dummy coded.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;2. Once you’ve made the changes above you can pick which level is the reference level. You do not need to dummy code it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Most of those are better explained in the LOGISTIC regression procedure so maybe finding some good example of that is an easier starting point?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/338087"&gt;@tpakhomova&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using PROC GLMSELECT for a multiple linear regression model that has categorical variables, which have more than 2 levels, as explanatory variables. I am examining the relationship between stress scores and sexual health variables. I am pretty new to SAS so need some help determining if I am coding this correctly, and if my interpretation is correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my model:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc GLMSELECT data=baseline;&lt;BR /&gt;class gender;&lt;BR /&gt;model PSS_score = sexual_orient ever_preg cons_sex_age partners_6M CES_D_dep&lt;BR /&gt;/ selection=stepwise select=SL showpvalues SLE=0.05 ;&lt;BR /&gt;title "Stepwise Regression SRH for OVERALL, 0.05";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Does this model look like its coded alright?&lt;/P&gt;
&lt;P&gt;2) When I runs this, how exactly do I interpret the results? For example - my variable "cons_sex_age" (age at first sex) has three levels (never had sex, 15 and under, 16 and over), coded as 0, 1, 2. How do I interpret the relationship between stress score and "cons_sex_age"? Would my reference category be what is coded as 0? AKA the parameter estimate would be the relationship between stress score and the "15 and under", which is coded as 0. Or do I need to create dummy variables for GLMSELECT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have found the SAS guidance notes on this quite confusing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jul 2020 00:46:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-25T00:46:35Z</dc:date>
    <item>
      <title>Using GLMSELECT for explanatory variables with &gt;2 levels. Model building and interpreting results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672230#M201988</link>
      <description>&lt;P&gt;I am using PROC GLMSELECT for a multiple linear regression model that has categorical variables, which have more than 2 levels, as explanatory variables. I am examining the relationship between stress scores and sexual health variables. I am pretty new to SAS so need some help determining if I am coding this correctly, and if my interpretation is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my model:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc GLMSELECT data=baseline;&lt;BR /&gt;class gender;&lt;BR /&gt;model PSS_score = sexual_orient ever_preg cons_sex_age partners_6M CES_D_dep&lt;BR /&gt;/ selection=stepwise select=SL showpvalues SLE=0.05 ;&lt;BR /&gt;title "Stepwise Regression SRH for OVERALL, 0.05";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Does this model look like its coded alright?&lt;/P&gt;&lt;P&gt;2) When I runs this, how exactly do I interpret the results? For example - my variable "cons_sex_age" (age at first sex) has three levels (never had sex, 15 and under, 16 and over), coded as 0, 1, 2. How do I interpret the relationship between stress score and "cons_sex_age"? Would my reference category be what is coded as 0? AKA the parameter estimate would be the relationship between stress score and the "15 and under", which is coded as 0. Or do I need to create dummy variables for GLMSELECT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found the SAS guidance notes on this quite confusing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 22:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672230#M201988</guid>
      <dc:creator>tpakhomova</dc:creator>
      <dc:date>2020-07-24T22:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using GLMSELECT for explanatory variables with &gt;2 levels. Model building and interpreting res</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672252#M202001</link>
      <description>&lt;P&gt;1. &amp;nbsp;No I do not think your code does what you intend, though it is correct, syntax wise. I think you want the REF and PARAM option on the CLASS statement for starters. Otherwise the default is GLM and you should check the design matrix which is outputted to see how it’s dummy coded.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;2. Once you’ve made the changes above you can pick which level is the reference level. You do not need to dummy code it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Most of those are better explained in the LOGISTIC regression procedure so maybe finding some good example of that is an easier starting point?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/338087"&gt;@tpakhomova&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using PROC GLMSELECT for a multiple linear regression model that has categorical variables, which have more than 2 levels, as explanatory variables. I am examining the relationship between stress scores and sexual health variables. I am pretty new to SAS so need some help determining if I am coding this correctly, and if my interpretation is correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my model:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc GLMSELECT data=baseline;&lt;BR /&gt;class gender;&lt;BR /&gt;model PSS_score = sexual_orient ever_preg cons_sex_age partners_6M CES_D_dep&lt;BR /&gt;/ selection=stepwise select=SL showpvalues SLE=0.05 ;&lt;BR /&gt;title "Stepwise Regression SRH for OVERALL, 0.05";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Does this model look like its coded alright?&lt;/P&gt;
&lt;P&gt;2) When I runs this, how exactly do I interpret the results? For example - my variable "cons_sex_age" (age at first sex) has three levels (never had sex, 15 and under, 16 and over), coded as 0, 1, 2. How do I interpret the relationship between stress score and "cons_sex_age"? Would my reference category be what is coded as 0? AKA the parameter estimate would be the relationship between stress score and the "15 and under", which is coded as 0. Or do I need to create dummy variables for GLMSELECT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have found the SAS guidance notes on this quite confusing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 00:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672252#M202001</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-25T00:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using GLMSELECT for explanatory variables with &gt;2 levels. Model building and interpreting res</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672257#M202005</link>
      <description>Thank you very much Reeza. Quick follow-up question-&lt;BR /&gt;&lt;BR /&gt;So if I have the following:&lt;BR /&gt;&lt;BR /&gt;proc GLMSELECT data=baseline;&lt;BR /&gt;class gender /PARAM=REF REF=first;&lt;BR /&gt;model PSS_score = sexual_orient ever_preg cons_sex_age partners_6M CES_D_dep&lt;BR /&gt;/ selection=stepwise select=SL showpvalues SLE=0.05 ;&lt;BR /&gt;title "Stepwise Regression SRH for OVERALL, 0.05";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Would REF=first mean that the level coded 0 would be the reference? (if my levels are 0-2). Or would it make sense for my levels to be coded 1-3</description>
      <pubDate>Sat, 25 Jul 2020 03:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-GLMSELECT-for-explanatory-variables-with-gt-2-levels-Model/m-p/672257#M202005</guid>
      <dc:creator>tpakhomova</dc:creator>
      <dc:date>2020-07-25T03:17:24Z</dc:date>
    </item>
  </channel>
</rss>

