<?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 phreg / p-value for interaction (non-time covariates) by comparing two models in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-p-value-for-interaction-non-time-covariates-by/m-p/610393#M29550</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to calculate a p-value for non-time covariates interaction by comparing two models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first, I calculated the hazard ratio using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC PHREG DATA=PCA4;
	CLASS FACTOR4_RANK(REF='0') AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4_RANK AGE_CAT A00_SEX_N / RISKLIMITS;
	STRATA AGE_CAT;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then, I tried to calculate a p-value for interaction in sex and independent variable by comparing two models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC PHREG DATA=PCA4;
	CLASS AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4 AGE_CAT A00_SEX_N / RISKLIMITS;
	STRATA AGE_CAT;
RUN; /*-2LogL with covariates = 17410.810*/

PROC PHREG DATA=PCA4;
	CLASS AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4 AGE_CAT A00_SEX_N A00_SEX_N*FACTOR4 / RISKLIMITS;
	STRATA AGE_CAT;
RUN; /*-2LogL with covariates =17407.791*/

DATA _NULL_;
DIFF=17410.810-17407.791;
p=1-PROBCHI(DIFF,1);
PUT p; /*p=0.082*/
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I have 2 questions as below.&lt;/P&gt;&lt;P&gt;(In the syntax for calculating a hazard ratio(first attached), the independent variable was "FACTOR4_RANK" which was categorizing "FACTOR4" continuous variable into tertiles)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I just want to check by all of you whether this syntax has any statistical problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) When I calculate a hazard ratio, I used a categorical variable as an independent variable ("FACTOR4_RANK"),&lt;/P&gt;&lt;P&gt;but when I calculate a p-value for sex interaction with the independent variable, I used a continuous variable as an independent variable and interaction term ("FACTOR4" and "A00_SEX_N*FACTOR4").&lt;BR /&gt;My question is that if I used a categorical variable("FACTOR4_RANK") as an independent variable to find a hazard ratio,&lt;/P&gt;&lt;P&gt;should I use a categorical variable("FACTOR4_RANK") as an independent variable and interaction term in the syntax for calculating a p-value for interaction in the same way?&lt;/P&gt;&lt;P&gt;Or is there no statistical problem if I use the continuous variable("FACTOR4") to get a p-value for interaction and the categorical variable("FACTOR4_RANK") to get a hazard ratio?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps I lack the concept of finding the interaction between covariates(non-time dependent) and independent variables.&lt;/P&gt;&lt;P&gt;Thanks for your guidance.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2019 07:24:24 GMT</pubDate>
    <dc:creator>Eunhee</dc:creator>
    <dc:date>2019-12-09T07:24:24Z</dc:date>
    <item>
      <title>Proc phreg / p-value for interaction (non-time covariates) by comparing two models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-p-value-for-interaction-non-time-covariates-by/m-p/610393#M29550</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to calculate a p-value for non-time covariates interaction by comparing two models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first, I calculated the hazard ratio using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC PHREG DATA=PCA4;
	CLASS FACTOR4_RANK(REF='0') AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4_RANK AGE_CAT A00_SEX_N / RISKLIMITS;
	STRATA AGE_CAT;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then, I tried to calculate a p-value for interaction in sex and independent variable by comparing two models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC PHREG DATA=PCA4;
	CLASS AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4 AGE_CAT A00_SEX_N / RISKLIMITS;
	STRATA AGE_CAT;
RUN; /*-2LogL with covariates = 17410.810*/

PROC PHREG DATA=PCA4;
	CLASS AGE_CAT(REF='1') A00_SEX_N(REF='1');
	MODEL F_TIME_Y*DYSLIPI_D(0)= FACTOR4 AGE_CAT A00_SEX_N A00_SEX_N*FACTOR4 / RISKLIMITS;
	STRATA AGE_CAT;
RUN; /*-2LogL with covariates =17407.791*/

DATA _NULL_;
DIFF=17410.810-17407.791;
p=1-PROBCHI(DIFF,1);
PUT p; /*p=0.082*/
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I have 2 questions as below.&lt;/P&gt;&lt;P&gt;(In the syntax for calculating a hazard ratio(first attached), the independent variable was "FACTOR4_RANK" which was categorizing "FACTOR4" continuous variable into tertiles)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I just want to check by all of you whether this syntax has any statistical problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) When I calculate a hazard ratio, I used a categorical variable as an independent variable ("FACTOR4_RANK"),&lt;/P&gt;&lt;P&gt;but when I calculate a p-value for sex interaction with the independent variable, I used a continuous variable as an independent variable and interaction term ("FACTOR4" and "A00_SEX_N*FACTOR4").&lt;BR /&gt;My question is that if I used a categorical variable("FACTOR4_RANK") as an independent variable to find a hazard ratio,&lt;/P&gt;&lt;P&gt;should I use a categorical variable("FACTOR4_RANK") as an independent variable and interaction term in the syntax for calculating a p-value for interaction in the same way?&lt;/P&gt;&lt;P&gt;Or is there no statistical problem if I use the continuous variable("FACTOR4") to get a p-value for interaction and the categorical variable("FACTOR4_RANK") to get a hazard ratio?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps I lack the concept of finding the interaction between covariates(non-time dependent) and independent variables.&lt;/P&gt;&lt;P&gt;Thanks for your guidance.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 07:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-p-value-for-interaction-non-time-covariates-by/m-p/610393#M29550</guid>
      <dc:creator>Eunhee</dc:creator>
      <dc:date>2019-12-09T07:24:24Z</dc:date>
    </item>
  </channel>
</rss>

