<?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 Analysis of residuals - linear estimates are negative in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885312#M43841</link>
    <description>&lt;P&gt;In any regression, there is no a priori restriction that slopes be positive. A negative slope indicates that if X increases, then the prediction of Y decreases. Here is an example from PHREG where a negative slope is produced.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 16:46:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-07-18T16:46:52Z</dc:date>
    <item>
      <title>Proc phreg Analysis of residuals - linear estimates are negative</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885290#M43840</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;we used the syntax from the example&amp;nbsp;86.9 Analysis of Residuals in the SAS documentation for out data.&lt;/P&gt;&lt;P&gt;That what is surprising for us is that the linear predictor in the plots is negative between -4 und 1.&lt;/P&gt;&lt;P&gt;Is this reasonable?&lt;/P&gt;&lt;P&gt;We thought that the linear predictor predicts the survival time and should be a positive value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;statstats&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=cox_regression_ohne;&lt;BR /&gt;class sex_r(ref='Female') / param=ref;&lt;BR /&gt;model survival_mth*tod(0) = age_at_index sex_r CCI_vorSZT time_to_SCT_mth / rl ;&lt;BR /&gt;output out=Outp xbeta=Xb resmart=Mart resdev=Dev;&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Outp;&lt;BR /&gt;yaxis grid;&lt;BR /&gt;refline 0 / axis=y;&lt;BR /&gt;scatter y=Mart x=Xb;&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Outp;&lt;BR /&gt;yaxis grid;&lt;BR /&gt;refline 0 / axis=y;&lt;BR /&gt;scatter y=Dev x=Xb;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasstats_0-1689693674039.png" style="width: 545px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85881i579A566876B79EA3/image-dimensions/545x410?v=v2" width="545" height="410" role="button" title="sasstats_0-1689693674039.png" alt="sasstats_0-1689693674039.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasstats_1-1689693712144.png" style="width: 540px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85882i7AD64A8312C2404C/image-dimensions/540x402?v=v2" width="540" height="402" role="button" title="sasstats_1-1689693712144.png" alt="sasstats_1-1689693712144.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885290#M43840</guid>
      <dc:creator>sasstats</dc:creator>
      <dc:date>2023-07-18T15:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc phreg Analysis of residuals - linear estimates are negative</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885312#M43841</link>
      <description>&lt;P&gt;In any regression, there is no a priori restriction that slopes be positive. A negative slope indicates that if X increases, then the prediction of Y decreases. Here is an example from PHREG where a negative slope is produced.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 16:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885312#M43841</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-18T16:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc phreg Analysis of residuals - linear estimates are negative</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885313#M43842</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209123"&gt;@sasstats&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume you are referring to the &lt;A href="https://documentation.sas.com/doc/en/statcdc/14.2/statug/statug_phreg_examples09.htm" target="_blank" rel="noopener"&gt;PROC PHREG documentation of&amp;nbsp;SAS/STAT &lt;EM&gt;14.2&lt;/EM&gt;&lt;/A&gt;. For each observation in the input dataset the "linear predictor" is the argument of the EXP() function in the formulas shown in the &lt;A href="https://documentation.sas.com/doc/en/statcdc/14.2/statug/statug_phreg_overview.htm" target="_blank" rel="noopener"&gt;Overview: PHREG Procedure&lt;/A&gt;. You can verify this by adding the &lt;A href="https://documentation.sas.com/doc/en/statcdc/14.2/statug/statug_phreg_syntax01.htm#statug.phreg.phrprocoutest" target="_blank" rel="noopener"&gt;OUTEST= option&lt;/A&gt; to the PROC PHREG statement and then use a DATA step to compute the linear combination that "X beta" stands for:&lt;/P&gt;
&lt;PRE&gt;proc phreg data=Myeloma &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;outest=est&lt;/STRONG&gt;&lt;/FONT&gt;;
model Time*Vstatus(0)=LogBUN HGB;
output out=Outp xbeta=Xb resmart=Mart resdev=Dev;
run;

&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;data chk;
if _n_=1 then set est(rename=(LogBUN=b1 HGB=b2));
set Outp;
c=b1*LogBUN+b2*HGB;
run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;(using the input dataset and the PROC PHREG step from that example 86.9). Variable &lt;FONT face="courier new,courier"&gt;c&lt;/FONT&gt; equals variable &lt;FONT face="courier new,courier"&gt;Xb&lt;/FONT&gt; up to extremely small rounding errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, these &lt;FONT face="courier new,courier"&gt;Xb&lt;/FONT&gt; values are &lt;EM&gt;not&lt;/EM&gt; survival &lt;EM&gt;times&lt;/EM&gt;, but &lt;EM&gt;via the exponential function&lt;/EM&gt;&amp;nbsp;(returning only positive values) they go into the estimation of the survival &lt;EM&gt;probabilities&lt;/EM&gt;, as described in&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/statcdc/14.2/statug/statug_phreg_details62.htm" target="_blank" rel="noopener"&gt;Survivor Function Estimators&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 16:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885313#M43842</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-18T16:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc phreg Analysis of residuals - linear estimates are negative</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885324#M43843</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;In any regression, there is no a priori restriction that slopes be positive. A negative slope indicates that if X increases, then the prediction of Y decreases. Here is an example from PHREG where a negative slope is produced.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is also a good argument. As soon as one of the "slope" coefficients &lt;EM&gt;&lt;FONT face="symbol"&gt;b&lt;/FONT&gt;&lt;SUB&gt;i&lt;/SUB&gt;&lt;/EM&gt; is negative, it's fairly obvious that for suitable values of the predictor variables also the "linear predictor" (&lt;FONT face="courier new,courier"&gt;Xb&lt;/FONT&gt;) can become negative. In the Myeloma data example, e.g., if &lt;FONT face="courier new,courier"&gt;LogBUN=0&lt;/FONT&gt;&amp;nbsp;(or positive, but small enough) and &lt;FONT face="courier new,courier"&gt;HGB&amp;gt;0&lt;/FONT&gt;. Similarly, even if all&amp;nbsp;&lt;EM&gt;&lt;FONT face="symbol"&gt;b&lt;/FONT&gt;&lt;SUB&gt;i&lt;/SUB&gt;&lt;/EM&gt; were positive, negative &lt;FONT face="courier new,courier"&gt;Xb&lt;/FONT&gt; values could occur with suitable negative values of one or more&amp;nbsp;predictor variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Myeloma data example (unlike the OP's case) all &lt;FONT face="courier new,courier"&gt;Xb&lt;/FONT&gt; values just &lt;EM&gt;happen to be&lt;/EM&gt; positive, even though &lt;EM&gt;&lt;FONT face="symbol"&gt;b&lt;/FONT&gt;&lt;SUB&gt;2&lt;/SUB&gt;&lt;/EM&gt;&amp;nbsp;= −0.11899 &amp;lt; 0.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-phreg-Analysis-of-residuals-linear-estimates-are-negative/m-p/885324#M43843</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-18T17:32:27Z</dc:date>
    </item>
  </channel>
</rss>

