<?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 glm - categorical variable 2 levels but don't want interaction tested for each level in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622557#M29980</link>
    <description>&lt;P&gt;Species=Summar is the reference level. Because you've included an intercept term, the GLM can only estimate DIFFERENCES between levels. For the mathematical details, see &lt;A href="https://blogs.sas.com/content/iml/2018/11/28/singular-parameterization-generalized-inverse-regression-estimate.html" target="_self"&gt;"Singular parameterizations, generalized inverses, and regression estimates"&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 21:06:19 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2020-02-05T21:06:19Z</dc:date>
    <item>
      <title>proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622525#M29971</link>
      <description>&lt;P&gt;Hi, I am trying to run proc glm (on SAS 9.4 TS Level 1M5) with a continuous dependent variable (log10biomarker) and 1 continuous independent variable (log10root) and 1 categorical independent variable (Species: either Kanlow or Summer). I would like to test for the separate effects of log10root and Species, but also for the interaction between the two independent variables. I have tried the code (below), specifying that Species is a categorical variable with the statement Class. And no dummy coding was necessary as the dataset lists either "Kanlow" or "Summer" in every cell (i.e. not say, "0" for Kanlow and "1" for Summer). However, the output (attached) shows that the interaction is tested for Kanlow and Summer individually. Instead, I want to simply test the interaction log10root * Species on log10biomarker (i.e. does the effect of log10root on log10biomarker change based on whether the species is Kanlow or Summer).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glm data=Rootmicr.Initial;&lt;BR /&gt;Class Species;&lt;BR /&gt;by Group;&lt;BR /&gt;model log10biomarker = log10root | Species / solution;&lt;BR /&gt;ods output ParameterEstimates=Rootmicr.IniDepthSpecIntxnGLMparmestim;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proc glm species intxn problem.JPG" style="width: 438px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35879i49D0058D7658A9B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="proc glm species intxn problem.JPG" alt="proc glm species intxn problem.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 18:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622525#M29971</guid>
      <dc:creator>mihoyoshi</dc:creator>
      <dc:date>2020-02-05T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622529#M29973</link>
      <description>&lt;P&gt;This is the correct output when you have an interaction between a class x-variable and a continuous x-variable.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The interaction is statistically significant (Pr &amp;gt; F is less than 0.05), and the area you have highlighted indicates the different slopes of log10root to predict log10biomarker, depending on which species is used.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 19:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622529#M29973</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-05T19:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622532#M29974</link>
      <description>&lt;P&gt;I see. Any thoughts on why there are no values in the parameter estimates output for when Species=Summer?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 19:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622532#M29974</guid>
      <dc:creator>mihoyoshi</dc:creator>
      <dc:date>2020-02-05T19:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622542#M29975</link>
      <description>&lt;P&gt;That's how SAS has chosen to parameterize the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a short description about this (in a slightly different situation, although the same principle applies here)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-with-Categorical/m-p/591230#M28913" target="_blank" rel="noopener"&gt;Interpreting Multivariate Linear Regression with Categorical Variables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 19:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622542#M29975</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-05T19:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622557#M29980</link>
      <description>&lt;P&gt;Species=Summar is the reference level. Because you've included an intercept term, the GLM can only estimate DIFFERENCES between levels. For the mathematical details, see &lt;A href="https://blogs.sas.com/content/iml/2018/11/28/singular-parameterization-generalized-inverse-regression-estimate.html" target="_self"&gt;"Singular parameterizations, generalized inverses, and regression estimates"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 21:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622557#M29980</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-02-05T21:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622568#M29981</link>
      <description>&lt;P&gt;I ran this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=Rootmicr.Initial;
Class Species;
by Group;
model log10biomarker = log10root | depthnum | Species / solution;
lsmeans Species / stderr pdiff cov out=adjmeans;;
ods output ParameterEstimates=Rootmicr.IniDepthSpecIntxnGLMparmestim;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How does one interpret this part of the output?&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;The SAS System&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;DIV class="c proctitle"&gt;The GLM Procedure&lt;/DIV&gt;&lt;DIV class="c proctitle"&gt;Least Squares Means&lt;/DIV&gt;&lt;DIV class="c byline"&gt;Group=Universa&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Species log10biomarker LSMEAN StandardError H0:LSMEAN=0 H0:LSMean1=LSMean2Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t| Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t|KanlowSummer &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1.18374631&lt;/TD&gt;&lt;TD&gt;0.30934731&lt;/TD&gt;&lt;TD&gt;0.0010&lt;/TD&gt;&lt;TD&gt;0.2874&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1.58113183&lt;/TD&gt;&lt;TD&gt;0.19197711&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Feb 2020 22:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/622568#M29981</guid>
      <dc:creator>mihoyoshi</dc:creator>
      <dc:date>2020-02-05T22:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm - categorical variable 2 levels but don't want interaction tested for each level</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/625418#M30106</link>
      <description>&lt;P&gt;There is only a single interaction estimated, and that is the -4.08 value. What is confusing you is just the fact that your Species variable is a CLASS (categorical) predictor and is represented in the model with two dummy-coded (0,1-coded) variables. However, since Species has two levels, it has only 1 degree of freedom and therefore only 1 estimable parameter. The second parameter is restricted to zero. Similarly, the interaction has only 1 degree of freedom (1 for log10root times 1 for Species equals 1). Again, the second is restricted to zero. The significant -4.08 interaction suggests that the effect of log10root differs between the two Species.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 19:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-categorical-variable-2-levels-but-don-t-want/m-p/625418#M30106</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-02-17T19:59:24Z</dc:date>
    </item>
  </channel>
</rss>

