BookmarkSubscribeRSS Feed
jdykstra
Calcite | Level 5

Hello,

 

I was just curious if there is a difference between a*b and a(b) in proc glm.

 

proc glm;
      class a b;
      model y=a b a*b;
run;

proc glm;
      class a b;
      model y=a b a(b);
run;
1 REPLY 1
ballardw
Super User

a(b) is "a nested within b"

a*b is interaction

 

make some data, run the code, see the result. Make sure to use some variety in the a b values per record

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 698 views
  • 0 likes
  • 2 in conversation