BookmarkSubscribeRSS Feed
howchinh2
Calcite | Level 5

Hi,
How can I write the code using PROC GAM for y=s1(x1)+s2(x2), where the intercept and linear terms are suppressed?

 

I have tried using model option noint but it gave error. 

 

proc gam data=mydata;

model y = spline(x1) spline(x2) / noint;

output out=pred predicted=f;

run;

 

The error message shows model statement didn't recognise noint option.

 

Please help.

Thank you.

 

2 REPLIES 2
StatDave
SAS Super FREQ

You might be able to get essentially what you want by using the EFFECT statement in a suitable modeling procedure rather than by using PROC GAM (or the newer and recommended PROC GAMPL). For example, the following fits a model like you describe to the diabetes data in the Getting Started example in the PROC GAM documentation using the EFFECT statement in PROC ORTHOREG. See the description of spline effects using the EFFECT statement in the Shared Concepts and Topics chapter of the SAS/STAT User's Guide.

proc orthoreg data=diabetes;
effect s1=spline(age/ basis=tpf(nopowers));
model logcp=s1/noint;
effectplot;
run;
howchinh2
Calcite | Level 5

Thank you so much for your advice. 

I will work on it. 

Thanks.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 386 views
  • 3 likes
  • 2 in conversation