BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have one continuous variable (X), a categorical variable (Z; treatment condition with three levels), and a continuous outcome variable (Z). X is an individual difference variable.

I have already figured out how to compare the different treatment conditions for different values of X. For example, for comparing treatment 1 and 2 among individuals scoring low on X (Mean of X at -1 SD = 4.2261), I would write the following:

proc glm;
class Z;
model y = Z X Z*X;
ESTIMATE 'Z 1 vs 2 at low X' Z -1 1 0 Z*X -4.2261 4.2261 0;
run;

However, I can't figure out how to test whether individuals that score high versus low on X differ in Y, for each level of Z. (e.g., comparing Y scores for low and high X in treatment condition 1; comparing Y scores for low and high X in treatment condition 2 etc).

Any suggestions?
1 REPLY 1
Dale
Pyrite | Level 9
It usually helps to write out the ESTIMATE statement for each condition that you want to use in a contrast and then take the difference between the coefficients that are involved in that contrast. For instance, for treatment group 1, estimate statements for low and high X would be

estimate "Trt=1, low X"
  z     1 0 0
  x     -4.661
  z*x  -4.661 0 0;

estimate "Trt=1, high X"
  z     1 0 0
  x     4.661
  z*x  4.661 0 0;


The difference between these two is the effect of interest that you are having trouble constructing. But as presented above, the effect of interest would be:

estimate "Trt=1, high vs low X"
  x     9.322
  z*x  9.322 0 0;

Just change the label and the last line to reflect the different treatment conditions.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1190 views
  • 0 likes
  • 2 in conversation