turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Proc GLM contrast/estimate statement

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-06-2010 12:12 PM

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?

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-08-2010 03:42 PM

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.

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.