<?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 PROC TTEST versus PROC GLM - CONTRAST in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83068#M23826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running tests on a dataset where my CLASS variable has 9 levels.&amp;nbsp; Two of the levels are very similar, and I want to determine whether they are significantly different from each other to see if they can actually be separated or whether they need to be combined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run PROC TTEST restricted to these two levels, they are shown to be significantly different from each other (Pr &amp;gt; |t|&amp;nbsp; is&amp;nbsp; &amp;lt;0.0001) and (Pr &amp;gt; F is &amp;lt;0.0001). &lt;/P&gt;&lt;P&gt;When I run a PROC GLM modeling the same 'var' variable for these two levels, however, the CONTRAST statement returns a significant yet different result (Pr &amp;gt; F = 0.0407).&amp;nbsp; &lt;/P&gt;&lt;P&gt;Should I expect TTEST and CONTRAST to find the same significance?&amp;nbsp; Is it recommended to rely on one or the other when testing for a significant difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if I run the full model (with an additional CLASS variable), the Pr &amp;gt; F in the CONTRAST output for the two levels increases to 0.3231.&amp;nbsp; Would you think that the levels need to be significantly different from each other in this full model, or only in the more basic model?&amp;nbsp; I realize that perhaps this decision may be left to the discretion of the modeler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 18:20:43 GMT</pubDate>
    <dc:creator>AJones</dc:creator>
    <dc:date>2013-05-22T18:20:43Z</dc:date>
    <item>
      <title>PROC TTEST versus PROC GLM - CONTRAST</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83068#M23826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running tests on a dataset where my CLASS variable has 9 levels.&amp;nbsp; Two of the levels are very similar, and I want to determine whether they are significantly different from each other to see if they can actually be separated or whether they need to be combined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run PROC TTEST restricted to these two levels, they are shown to be significantly different from each other (Pr &amp;gt; |t|&amp;nbsp; is&amp;nbsp; &amp;lt;0.0001) and (Pr &amp;gt; F is &amp;lt;0.0001). &lt;/P&gt;&lt;P&gt;When I run a PROC GLM modeling the same 'var' variable for these two levels, however, the CONTRAST statement returns a significant yet different result (Pr &amp;gt; F = 0.0407).&amp;nbsp; &lt;/P&gt;&lt;P&gt;Should I expect TTEST and CONTRAST to find the same significance?&amp;nbsp; Is it recommended to rely on one or the other when testing for a significant difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if I run the full model (with an additional CLASS variable), the Pr &amp;gt; F in the CONTRAST output for the two levels increases to 0.3231.&amp;nbsp; Would you think that the levels need to be significantly different from each other in this full model, or only in the more basic model?&amp;nbsp; I realize that perhaps this decision may be left to the discretion of the modeler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 18:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83068#M23826</guid>
      <dc:creator>AJones</dc:creator>
      <dc:date>2013-05-22T18:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST versus PROC GLM - CONTRAST</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83069#M23827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There really isn't a reason to believe that the contrast in GLM and the t test will give the same answer, as the data used are not the same.&amp;nbsp; GLM uses all of the groups, and bases the contrast on the mean square error (MSE), under the assumption of homogeneity of variance.&amp;nbsp; The other groups contribute to your knowledge of the estimated standard error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding the additional CLASS variable removes an additional source of variation.&amp;nbsp; One good example would be for a variable that had an additive gender effect.&amp;nbsp; Adding gender as a class variable would reduce the variability estimate, but also would remove a major difference between levels of the groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, the model ought to reflect the design (or in Walter Stroup's words: What would Fisher do?).&amp;nbsp; Combining or not combining two levels is more than just a question of significance testing.&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>Thu, 23 May 2013 12:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83069#M23827</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-05-23T12:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST versus PROC GLM - CONTRAST</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83070#M23828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; I thought I was restricting to the two levels in GLM by using a WHERE statement, but in fact I had not thought to delete the 7 extra zero placeholders in the CONTRAST statement.&amp;nbsp; That must have been throwing it off, because the probability does indeed now match the TTEST.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you say about the additional CLASS variable certainly makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as defining/combining variable levels, I agree that this should not be done post-experiment.&amp;nbsp; In this case, I'm doing a meta-analysis and looking for trends to determine whether certain conditions are significant across studies--I am neutral to whether they are combined or not, but will certainly comment on it either way in my analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your thoughtful response and explanation!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 16:05:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-TTEST-versus-PROC-GLM-CONTRAST/m-p/83070#M23828</guid>
      <dc:creator>AJones</dc:creator>
      <dc:date>2013-05-23T16:05:02Z</dc:date>
    </item>
  </channel>
</rss>

