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

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

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
  • 606 views
  • 0 likes
  • 2 in conversation