<?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] contrast is not estimable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/457251#M23854</link>
    <description>&lt;P&gt;I would also suggest adding the E option to the ESTIMATE which will match the coefficients of the L vector up with their respective parameters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contrast 'linear trend1' x1 -2 0 2 x1*x2 -1 0 1 -1 0 1/e;&lt;/P&gt;
&lt;P&gt;When you do that for this example you will notice that you are applying coefficients in the interaction to parameters where x1=2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to have the interaction coefficients match up with the levels in the main effect.&amp;nbsp; Something like this would be estimable:&lt;/P&gt;
&lt;P&gt;contrast 'linear trend1' x1 -2 0 2 x1*x2 -1 -1 0 0 1 1/e;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you would need to decide if this is actually what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To understand the logic of CONTRAST/ESTIMATE statements, I would (in addition to what Rick suggested) add these examples as well.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/447.html" target="_self"&gt;http://support.sas.com/kb/24/447.html&amp;nbsp;&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Apr 2018 12:30:46 GMT</pubDate>
    <dc:creator>SAS_Rob</dc:creator>
    <dc:date>2018-04-25T12:30:46Z</dc:date>
    <item>
      <title>[proc glm] contrast is not estimable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/456719#M23844</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data aaa;
input x1 x2 y @@;
datalines;

1 1 0.02  1 1 0.01 1 1 0.07 1 1 0.04 1 1 0.01 1 1 0.09 1 1 0.05 1 1 0.06
1 2 0.05 1 2 0.01 1 2 0.04 1 2 0.03  1 2 0.02 1 2 0.02 1 2 0.13 1 2 0.06
2 1 0.15 2 1 0.11 2 1 0.22 2 1 0.05  2 1 0.09 2 1 0.05 2 1 0.15 2 1 0.11
2 2 0.14 2 2 0.21 2 2 0.06 2 2 0.12 2 2 0.11 2 2 0.19 2 2 0.12 2 2 0.04
3 1 0.09 3 1 0.03 3 1 0.18 3 1 0.12 3 1 0.18 3 1 0.43 3 1 0.24 3 1 0.4
3 2 0.02 3 2 0.19 3 2 0.15 3 2 0.07 3 2 0.45 3 2 0.2 3 2 0.49 3 2 0.19
;
proc glm data=aaa;
class x1 x2;
model y=x1 x2 x1*x2;
contrast 'linear trend1' x1 -2 0 2 x1*x2 -1 0 1 -1 0 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get linear trend with interaction, and this contrast coding returned to me with a message that contrast is not estimable. Can somebody clear me out why it's not estimable? I tried bunch of other contrasts, but still the same. Thank you always for your help in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 23:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/456719#M23844</guid>
      <dc:creator>kelSAS</dc:creator>
      <dc:date>2018-04-23T23:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: [proc glm] contrast is not estimable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/456841#M23845</link>
      <description>&lt;P&gt;The SAS/STAT documentation contains &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introglmest_sect002.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;a section that discusses estimability&lt;/A&gt; and shows examples. If you change your MODEL statement to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;model y=x1 x2 x1*x2 / solution XPX;&lt;/P&gt;
&lt;P&gt;then you can see the X`X matrix and the parameter estimates for your model.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 12:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/456841#M23845</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-24T12:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: [proc glm] contrast is not estimable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/457251#M23854</link>
      <description>&lt;P&gt;I would also suggest adding the E option to the ESTIMATE which will match the coefficients of the L vector up with their respective parameters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contrast 'linear trend1' x1 -2 0 2 x1*x2 -1 0 1 -1 0 1/e;&lt;/P&gt;
&lt;P&gt;When you do that for this example you will notice that you are applying coefficients in the interaction to parameters where x1=2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to have the interaction coefficients match up with the levels in the main effect.&amp;nbsp; Something like this would be estimable:&lt;/P&gt;
&lt;P&gt;contrast 'linear trend1' x1 -2 0 2 x1*x2 -1 -1 0 0 1 1/e;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you would need to decide if this is actually what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To understand the logic of CONTRAST/ESTIMATE statements, I would (in addition to what Rick suggested) add these examples as well.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/447.html" target="_self"&gt;http://support.sas.com/kb/24/447.html&amp;nbsp;&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 12:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-contrast-is-not-estimable/m-p/457251#M23854</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2018-04-25T12:30:46Z</dc:date>
    </item>
  </channel>
</rss>

