Hi sas users!
I am currently working on a study assessing the link between the Lymphocyte/Monocyte ratio and the progression free survival.
I would like to use this ratio as a spline in my model (Truncated power basis).
So far i did this:
proc phreg data = RELEVANCE_LMR;
effect slmr = spline(d_ratio_l_m_c / basis=tpf(noint) degree=3 knotmethod=EQUAL(1));
model D_TIME_PFS_IRC_EMA*D_CENS_PFS_IRC_EMA(1) = slmr/;
output out=mydatcub Xbeta=mylinpredcub;
run;
d_ratio_l_m_c represents my ratio which is centered on the median value (2.5). I would like to have only one knot corresponding to the median value (2.5), however i cannot how to retrieve the knot position after performing the "knotmethod=EQUAL(1)". Do you have any idea to find it?
Thanks in advance for your help
Hello,
Put the details option in your spline specification, just like here :
proc orthoreg data=sashelp.gas;
effect spl = spline(eqratio / knotmethod=equal(3) details);
class fuel;
model nox = spl | fuel;
effectplot / obs extend=data;
ods output SliceFitPlot=sp;
run;
That DETAILS option is documented here :
SAS/STAT 15.2 User's Guide
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_introcom_sect020.htm
DETAILS
requests tables that show the knot locations and the knots associated with each spline basis function.
Koen
Thank you for your answer!
Do you know how to force the knot position ?
Romain
Use KNOTMETHOD=LIST(list-of-values). But note that if you want to specify knots at percentiles, like the median, you can use KNOTMETHOD=PERCENTILELIST(list-of-percentiles). See all of the options in the EFFECT statement documentation for splines.
Thank you for your answer.
I just want to specify one knot which will be located at the median value of the Lymphocyte/Monocyte ratio. This value eq 2.5.
In my model, as i have centered my Ratio on the median value, i want my knot to be equal to 0. How can i specify this in the following statement?
effect slmr = spline(d_ratio_l_m_c / basis=tpf(noint) degree=3 knotmethod=EQUAL(1))
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.