Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sasstats
Fluorite | Level 6

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;

sasstats_0-1689693674039.png

sasstats_1-1689693712144.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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.

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

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
FreelanceReinh
Jade | Level 19

@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.

FreelanceReinh
Jade | Level 19

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.

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 907 views
  • 1 like
  • 3 in conversation