<?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 Estimate and Contrast statements in PROC GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126770#M6667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose you have these two statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Estimate 'X'&amp;nbsp; x&amp;nbsp; 1&amp;nbsp; -1;&lt;/P&gt;&lt;P&gt;Contrast 'X'&amp;nbsp; x&amp;nbsp; 1&amp;nbsp; -1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was under the impression that they would always give the exact same results.&amp;nbsp; I know Estimate and Contrast can do different things, but I thought in the simple case above they'd give the exact same results.&amp;nbsp; I'm getting different results.&amp;nbsp; The list of numbers in my statements is longer than just 1 -1, but I write an Estimate line, copy it and change nothing except change "Estimate" to "Contrast," run the model and the results for Estimate are different than the results for Contrast.&amp;nbsp; This is kinda scary since if you do either Contrast or Estimate you assume it's right, but when you do them both and get different results then you know one of them must be wrong.&amp;nbsp; Any input is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2012 20:27:43 GMT</pubDate>
    <dc:creator>n6</dc:creator>
    <dc:date>2012-09-20T20:27:43Z</dc:date>
    <item>
      <title>Estimate and Contrast statements in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126770#M6667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose you have these two statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Estimate 'X'&amp;nbsp; x&amp;nbsp; 1&amp;nbsp; -1;&lt;/P&gt;&lt;P&gt;Contrast 'X'&amp;nbsp; x&amp;nbsp; 1&amp;nbsp; -1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was under the impression that they would always give the exact same results.&amp;nbsp; I know Estimate and Contrast can do different things, but I thought in the simple case above they'd give the exact same results.&amp;nbsp; I'm getting different results.&amp;nbsp; The list of numbers in my statements is longer than just 1 -1, but I write an Estimate line, copy it and change nothing except change "Estimate" to "Contrast," run the model and the results for Estimate are different than the results for Contrast.&amp;nbsp; This is kinda scary since if you do either Contrast or Estimate you assume it's right, but when you do them both and get different results then you know one of them must be wrong.&amp;nbsp; Any input is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 20:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126770#M6667</guid>
      <dc:creator>n6</dc:creator>
      <dc:date>2012-09-20T20:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate and Contrast statements in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126771#M6668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post an example?&amp;nbsp; I am at a loss to explain this, but some code and output might help.&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>Mon, 24 Sep 2012 12:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126771#M6668</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-09-24T12:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate and Contrast statements in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126772#M6669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would probably be better if there was a way to actually attach SAS code and output, and maybe there is, but since I don't know it I'll just type this in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc genmod data=ds_name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where x = 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class ID Varname;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model response = varname / noint dist=poisson covb;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; repeated subject=ID / ar(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; contrast 'Contrast Label' Varname 1 -1 0 0 0 0 0 0 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'Estimate Label' Varname 1 -1 0 0 0 0 0 0 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; lsmeans Varname / ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Contrast Estimate Results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L'Beta&amp;nbsp;&amp;nbsp; Standard&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L'Beta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chi-&lt;/P&gt;&lt;P&gt;Label&amp;nbsp;&amp;nbsp; Estimate&amp;nbsp;&amp;nbsp; Conf Limits&amp;nbsp;&amp;nbsp; Estimate&amp;nbsp;&amp;nbsp; Error&amp;nbsp;&amp;nbsp; Alpha&amp;nbsp;&amp;nbsp; Conf Limits&amp;nbsp;&amp;nbsp; Square&amp;nbsp;&amp;nbsp; P &amp;gt; Chi-Square&lt;/P&gt;&lt;P&gt;Label&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -1.27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -3.36&amp;nbsp;&amp;nbsp; 0.82&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.23&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Contrast Results for GEE Analysis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chi-&lt;/P&gt;&lt;P&gt;Contrast&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Square&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pr &amp;gt; Chi-Square&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;Label&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.71&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Score&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Hopefully that's readable.&amp;nbsp; I cut off some decimal places and did other abbreviations to make it fit, but the general gist is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re. the code, I don't see how the "WHERE" statement can matter but I included it anyway.&amp;nbsp; I get the same results regardless of whether I include "NOINT."&amp;nbsp; (I mean, I get the same results as above, but the parameter estimate of course do change.)&amp;nbsp; I don't see how any of the other stuff can matter.&amp;nbsp; The fact that the contrast output indicates it's a Score statistic and the estimate output doesn't say anything about that makes me think they could be doing two different things but still, as I said before, I thought under these circumstances they were doing the same thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 20:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126772#M6669</guid>
      <dc:creator>n6</dc:creator>
      <dc:date>2012-09-24T20:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate and Contrast statements in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126773#M6670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, one check would be to explore the LSMEANS and LSMESTIMATE statement (if this is available in your version).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your LSMEANS statement was: lsmeans varname/diff ilink; you could compare the results for the first comparison to each of the two methods.&amp;nbsp; See which corresponds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Went to the documentation--way down in the Details section is a part on Generalized Score Statistics under GEE models.&amp;nbsp; It looks like the contrast statement is using the quadratic form reported there, while the estimate statement uses the standard quadratic form to get the chi-square values. Also, in the documentation for the CONTRAST statement, it says "If you omit the WALD option, the test statistic computed depends on whether an ordinary generalized linear model or a GEE-type model is specified."&amp;nbsp; And there is the difference--the ESTIMATE statement always produces a Wald chi-square, while the CONTRAST statement picks based on the type of model.&amp;nbsp; So now you have to determine which is appropriate.&amp;nbsp; My money is on the generalized score statistic, since under GEE you should accommodate the covariance error structure, and it appears (at least to me) that this is not necessarily the case for the ESTIMATE statement.&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>Tue, 25 Sep 2012 11:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-and-Contrast-statements-in-PROC-GENMOD/m-p/126773#M6670</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-09-25T11:59:47Z</dc:date>
    </item>
  </channel>
</rss>

