<?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 PHREG Contrast statement for hypothesis testing in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/668238#M31908</link>
    <description>&lt;P&gt;Moved to STAT forum in the hope you'll get an answer there.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jul 2020 02:04:10 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-07-10T02:04:10Z</dc:date>
    <item>
      <title>PROC PHREG Contrast statement for hypothesis testing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/667838#M31907</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand how we can test a level that is also a reference group??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm focusing on race here for hypothesis testing. Race is categorized as:&lt;/P&gt;&lt;P&gt;1 White&lt;/P&gt;&lt;P&gt;2 Other&lt;/P&gt;&lt;P&gt;3 Black&lt;/P&gt;&lt;P&gt;4 Hispanic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc PHREG data=x;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class&lt;/STRONG&gt; race (ref=first);&lt;/P&gt;&lt;P&gt;model time*status(0)= age &lt;STRONG&gt;race&lt;/STRONG&gt; gender;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;contrast&lt;/STRONG&gt; 'white+other Vs. Black+hispanic' race (1 1 -1 -1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will this contrast statement test the hypothesis of category what/other vs black/hispanic? or do I need to remove the class statement to do so, since the class statement would make the ref category to 0..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So confused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 20:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/667838#M31907</guid>
      <dc:creator>SASnewbiee</dc:creator>
      <dc:date>2020-07-08T20:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG Contrast statement for hypothesis testing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/668238#M31908</link>
      <description>&lt;P&gt;Moved to STAT forum in the hope you'll get an answer there.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 02:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/668238#M31908</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-10T02:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG Contrast statement for hypothesis testing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/668353#M31915</link>
      <description>&lt;P&gt;Rather than writing a contrast statement (which requires knowing coefficients for all the effects in a model, even though most would be zero in your case) try using an lsmestiimate statement which compares the average of white and other to the average of black and hispanic;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lsmestimate race &lt;SPAN&gt;'white+other Vs. Black+hispanic' 1 1 -1 -1/divisor=2;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Reference levels don't enter into things this way.&amp;nbsp; Instead least squares means for each level are constructed and then compared using the coefficients.&amp;nbsp; You can check this by also adding&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;lsmeans race;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and hand computing the difference.&amp;nbsp; It should match the lsmestimate value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-Contrast-statement-for-hypothesis-testing/m-p/668353#M31915</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-10T12:41:06Z</dc:date>
    </item>
  </channel>
</rss>

