<?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: how to specify strata specific effects in PHREG? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462813#M24126</link>
    <description>&lt;P&gt;thanks for the explanation.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 19:20:07 GMT</pubDate>
    <dc:creator>alexchien</dc:creator>
    <dc:date>2018-05-16T19:20:07Z</dc:date>
    <item>
      <title>how to specify strata specific effects in PHREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462148#M24108</link>
      <description>&lt;P&gt;How to i modify the following sample code to get the strata specific effects for a and b? thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data = abc;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; class a b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; model time*event(0) = a b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; strata c d;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 18:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462148#M24108</guid>
      <dc:creator>alexchien</dc:creator>
      <dc:date>2018-05-14T18:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to specify strata specific effects in PHREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462307#M24109</link>
      <description>&lt;P&gt;Hi Alexchien,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is important to understand that the strata statement in PHREG means that the baseline hazard function can depend on the variables you put in the strata statement. The variables you put in the model statement will have same effect across the strata variables - unless ofcourse you have also putted the strata variables in the model line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the effect of A and B to depend of the level of C and D, then you can do as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data simulation;
  do i=1 to 1000;
    A=rand('bernoulli',0.5);
    B=rand('bernoulli',0.5);
    C=rand('bernoulli',0.5);
    D=rand('bernoulli',0.5);
	t=rand('exponential',10);
	output;
  end;
run;

proc phreg data=simulation;
  class A B C D/param=glm;
  model t=A*C*D B*C*D;
  hazardratio A/at(C=all D=all);
  hazardratio B/at(C=all D=all);
run;

*or, if you want each strata to has its own baseline hazard function, you should also use the strata statement;


proc phreg data=simulation;
  class A B C D/param=glm;
  model t=A*C*D B*C*D;
  strata C D;
  hazardratio A/at(C=all D=all);
  hazardratio B/at(C=all D=all);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that you need the "glm" parametrization to make the interactions effects that allows you to use C and D as effectmodifiers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 11:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462307#M24109</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2018-05-15T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to specify strata specific effects in PHREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462813#M24126</link>
      <description>&lt;P&gt;thanks for the explanation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 19:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-specify-strata-specific-effects-in-PHREG/m-p/462813#M24126</guid>
      <dc:creator>alexchien</dc:creator>
      <dc:date>2018-05-16T19:20:07Z</dc:date>
    </item>
  </channel>
</rss>

