BookmarkSubscribeRSS Feed
Romain69100
Fluorite | Level 6

Dear SAS users,

 

I have a question truncated power basis spline. I am studying effect of Lymphocyte/Monocyte ratio (LMR) on progression free survival. To do so, i first centered the LMR on its median value which is 2.5. Then i used the 2 following code which conducted to same results:

/* 1 creation of truncated power basis spline */

data RELEVANCE_LMR;
set RELEVANCE_LMR;
d_ratio_l_m_c= d_ratio_l_m-2.5; /*centering the variable on its median value*/
d_ratio_l_m_c_sq = d_ratio_l_m_c**2;/*quadratic term*/
d_ratio_l_m_c_sq_plus = (d_ratio_l_m_c>=0)*d_ratio_l_m_c_sq;/*positive quadratic term*/

run;	


/* QUADRATIC SPLINE;*/

proc phreg data = RELEVANCE_LMR;
model D_TIME_PFS_IRC_EMA*D_CENS_PFS_IRC_EMA(1) = d_ratio_l_m_c d_ratio_l_m_c_sq d_ratio_l_m_c_sq_plus ;
output out=mydatsq Xbeta=mylinpredsq;
run;

/*second code*/
proc phreg data = RELEVANCE_LMR;
effect slmr = spline(d_ratio_l_m_c / basis=tpf(noint) degree=2 knotmethod=LIST(0));
model D_TIME_PFS_IRC_EMA*D_CENS_PFS_IRC_EMA(1) = slmr;
output out=mydatsquare Xbeta=mylinpredsquare;
run;

My first question is the following: When i extract linear predictors of these models and exponiate them, could you confirm me that i obtain Hazards ratio values relative to the value of 2.5

 

I would like to add a second knot for a value of LMR=20. How can i modify the previous code to do it? ( Can i keep the d_ratio_l_m_c variable which is centered on 2.5 and add 17.5 in the list option? and how hazard ratios will be interpreted (still elative to 2.5)? 

 

Thanks a lot for your help!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 0 replies
  • 551 views
  • 0 likes
  • 1 in conversation