BookmarkSubscribeRSS Feed
yasyuki_k
Calcite | Level 5

Hi, experts!

I need your help about GAM procedure.

If I use the ADDITIVE suboption with class statement to get the additive component plots, estimates for the plots aren't reasonable.

Is there any solution?

proc gam data=dataset plots=component(additive);

     class x0;

     model  y= param(x0) spline(x1) spline(x2) / link=Identity  dist=normal method=GCV;

run;

3 REPLIES 3
SteveDenham
Jade | Level 19

What do you mean that the plots aren't reasonable?  Can you give an example of what happens, and what you would expect?

Steve Denham

yasyuki_k
Calcite | Level 5

When model only included continuous variable,

estimates of additive component in the data from ods output SmoothingComponentPlot were like left table.

On the other hand, when model  include categorical variable,  estimates were like right table.

cont.PNGcat.PNG

SteveDenham
Jade | Level 19

It appears that the right hand column is giving the difference from the reference level of x0, which in the default case would be the last level.  Perhaps you could add the value of the last level (or its mean/median if the class collapses several values) to get values more like those on the left.

Steve Denham

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 3 replies
  • 1924 views
  • 3 likes
  • 2 in conversation