Programming the statistical procedures from SAS

PROC GAM: Additive suboption with class statement

Reply
New Contributor
Posts: 2

PROC GAM: Additive suboption with class statement

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;

Respected Advisor
Posts: 2,655

Re: PROC GAM: Additive suboption with class statement

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

New Contributor
Posts: 2

Re: PROC GAM: Additive suboption with class statement

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

Respected Advisor
Posts: 2,655

Re: PROC GAM: Additive suboption with class statement

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

Ask a Question
Discussion stats
  • 3 replies
  • 252 views
  • 3 likes
  • 2 in conversation