- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
we used the syntax from the example 86.9 Analysis of Residuals in the SAS documentation for out data.
That what is surprising for us is that the linear predictor in the plots is negative between -4 und 1.
Is this reasonable?
We thought that the linear predictor predicts the survival time and should be a positive value.
Thanks for help.
statstats
proc phreg data=cox_regression_ohne;
class sex_r(ref='Female') / param=ref;
model survival_mth*tod(0) = age_at_index sex_r CCI_vorSZT time_to_SCT_mth / rl ;
output out=Outp xbeta=Xb resmart=Mart resdev=Dev;
run;
proc sgplot data=Outp;
yaxis grid;
refline 0 / axis=y;
scatter y=Mart x=Xb;
run;
proc sgplot data=Outp;
yaxis grid;
refline 0 / axis=y;
scatter y=Dev x=Xb;
run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sasstats,
I assume you are referring to the PROC PHREG documentation of SAS/STAT 14.2. For each observation in the input dataset the "linear predictor" is the argument of the EXP() function in the formulas shown in the Overview: PHREG Procedure. You can verify this by adding the OUTEST= option to the PROC PHREG statement and then use a DATA step to compute the linear combination that "X beta" stands for:
proc phreg data=Myeloma outest=est; model Time*Vstatus(0)=LogBUN HGB; output out=Outp xbeta=Xb resmart=Mart resdev=Dev; run; data chk; if _n_=1 then set est(rename=(LogBUN=b1 HGB=b2)); set Outp; c=b1*LogBUN+b2*HGB; run;
(using the input dataset and the PROC PHREG step from that example 86.9). Variable c equals variable Xb up to extremely small rounding errors.
So, these Xb values are not survival times, but via the exponential function (returning only positive values) they go into the estimation of the survival probabilities, as described in Survivor Function Estimators.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@PaigeMiller wrote:
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.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_examples01.htm
This is also a good argument. As soon as one of the "slope" coefficients bi is negative, it's fairly obvious that for suitable values of the predictor variables also the "linear predictor" (Xb) can become negative. In the Myeloma data example, e.g., if LogBUN=0 (or positive, but small enough) and HGB>0. Similarly, even if all bi were positive, negative Xb values could occur with suitable negative values of one or more predictor variables.
In the Myeloma data example (unlike the OP's case) all Xb values just happen to be positive, even though b2 = −0.11899 < 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sasstats,
I assume you are referring to the PROC PHREG documentation of SAS/STAT 14.2. For each observation in the input dataset the "linear predictor" is the argument of the EXP() function in the formulas shown in the Overview: PHREG Procedure. You can verify this by adding the OUTEST= option to the PROC PHREG statement and then use a DATA step to compute the linear combination that "X beta" stands for:
proc phreg data=Myeloma outest=est; model Time*Vstatus(0)=LogBUN HGB; output out=Outp xbeta=Xb resmart=Mart resdev=Dev; run; data chk; if _n_=1 then set est(rename=(LogBUN=b1 HGB=b2)); set Outp; c=b1*LogBUN+b2*HGB; run;
(using the input dataset and the PROC PHREG step from that example 86.9). Variable c equals variable Xb up to extremely small rounding errors.
So, these Xb values are not survival times, but via the exponential function (returning only positive values) they go into the estimation of the survival probabilities, as described in Survivor Function Estimators.