BookmarkSubscribeRSS Feed
ALee
Calcite | Level 5

I am looking for some advice about interactions in SAS. 

 

I am running a MIXED linear model with categorical and continuous variables. I am trying to determine if there is a quadratic relationship in the variable labeled cat. Normally I would put cat*cat or cat|cat to try to get an interaction. But when I run that code, my output still doesn't have an interaction as one of my type 3 tests of fixed effects. Is there a different symbol to try? Does anyone have any advice? My log shows no error messages, but there must be something wrong. 

 

The code looks like this:

 

proc mixed data= allstock6 ; 
class robotnr yr2 week2 cat;
model Meal= ages week1 cat week2 cat*cat/ddfm=SATTERTH s; 
random pony week2(yr2) yr2;
repeated /type=ar(1) subject=pony;
lsmeans cat/diffs;
run;

 

Any help would be greatly appreciated!

2 REPLIES 2
StatsMan
SAS Super FREQ

If you want to treat CAT as a covariate, and model a linear and quadratic trend in CAT, then take CAT off the CLASS statement.  You cannot really interact a categorical variable with itself.

ALee
Calcite | Level 5

Wow, I felt dumb once I realized what I was doing. 

Thanks so much for the help!!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 910 views
  • 6 likes
  • 2 in conversation