BookmarkSubscribeRSS Feed
Romain69100
Fluorite | Level 6

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

9 REPLIES 9
sbxkoenk
SAS Super FREQ

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

Romain69100
Fluorite | Level 6

Thank you for your answer!

 

Do you know how to force the knot position ?

Romain

StatDave
SAS Super FREQ

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

Romain69100
Fluorite | Level 6

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))
StatDave
SAS Super FREQ
Use the LIST() option as I mentioned. Replace EQUAL(1) with LIST(0) in KNOTMETHOD=.
Romain69100
Fluorite | Level 6
Tanks i tried your solution. Unfortunately i do not have an estimation for the last coefficient. Please find a screenshot below.

Analysis of Maximum Likelihood Estimates
Parameter / / DF / Parameter Estimate / Standard Error / Chi-Square / Pr > ChiSq / Hazard Ratio / Label
slmr / 1 / 1 / -0.01131 / 0.02359 / 0.2299 / 0.6316 /. / slmr 1
slmr / 2 / 1 / 0.00113 / 0.0009973 / 1.2939 0.2553 / . / slmr 2
slmr / 3 / 1 / -0.0000127 / 9.49004E-6 1.7897 / 0.1810 / . / slmr 3
slmr / 4 / 0 / 0/ . / . / . / . /slmr 4





StatDave
SAS Super FREQ
Generally speaking, any time a parameter is shown with zero DF it is due to that design column being collinear with some combination of the others. This typically necessitates simplifying your model. In your case, maybe a lower degree or a different basis, etc. As always, check your log to see if there are any helpful messages.
Romain69100
Fluorite | Level 6
Strangly with R software i was able to get estimate with this cubic spline..
StatDave
SAS Super FREQ
You would have to verify that the design variables created by your R code are exactly the same and that the model definition is the same to be sure of that conclusion. There could easily be some difference in the respective details.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 9 replies
  • 612 views
  • 5 likes
  • 3 in conversation