The first question in my mind is about the macro code RCS_Reg.sas. What is going on with it? Without access to that code, I don't see how we can help you accomplish what you want. Perhaps we could use PROC TPSPLINE, or the EFFECT and EFFECTPLOT commands in one of the PROC's which support them, such as GENMOD. Something like the second example in the EFFECTPLOT documentation might serve as an example. The reason I am jumping to that example is that you get a plot of the dependent variable as a function of the other variables, rather than a plot of the difference as a function of one of the variables. The issue with that particular approach is how to deal with the other variables in the model. So, I get to using PROC SGPLOT, with the PBSPLINE statement. Try something like:
proc sgplot data=sashelp.gas;
pbspline y=log_valu x=meat / nknots=3;
run;
SteveDenham
... View more