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
- /
- Easy question about estimates in proc mixed

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

10-27-2014 07:43 AM

Dear SAS users,

I'm doing my first analysis with SAS. But I can not go forward because of a simple question ... How could I get the estimates of interactions?

For example, in this simple model, where treatment (Trt) is a continuous variable because they are different doses (0 or control 1, 2, 3), age (1, 2, 3 and 4) and Sex (Female Male) are factors . And I want to analyze the quadratic effect of treatment on the size of a bird.

My final model would be this (for a repeated measures analysis):

proc mixed data = Birds covtest;

class Sex Age nest ring;

model Size = Trt*Trt*Age Trt*Trt Trt*Age Trt Age Sex Age*Sex / ddfm=satterth;

random nest;

Repeated age1 / subject = ring (nest) type = ar (1);

estimate 'treatment' Trt 1;

estimate 'treatment2' Trt*trt 1;

estimate 'sex' sex 1 -1;

estimate 'Age' 1 1 -1 -1; ????? is it ok?

estimate 'Age*Trt' Age*Trt??????????

estimate 'Age*Sex' Age*Sex ??????????

estimate 'trt*trt*Age' trt*trt*Age ?????????

run;

Thank you very much.

All the best,

Jaime

Accepted Solutions

Solution

10-27-2014
08:34 AM

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

10-27-2014 08:34 AM

Estimate statements are notoriously tricky, especially when incorporating continuous values.

To estimate the marginal mean of treatment = 1, averaged over all other factors, your first statment should look like:

estimate 'Marginal mean of treatment at trt=1' intercept trt 1 trt*trt 1;

Note that you cannot get an estimate of the linear effect mean independent of the quadratic because the two are continuous, and both are needed as inputs to the estimate statement. However, by adding 'solution' to the model statement, you will get the parameter estimate for each. Now that may address all of the things you are looking for in the estimate statements you have here.

I think you may want to look at differences between ages or sexes at various values of trt. Is that what you are after?

Steve Denham

All Replies

Solution

10-27-2014
08:34 AM

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

10-27-2014 08:34 AM

Estimate statements are notoriously tricky, especially when incorporating continuous values.

To estimate the marginal mean of treatment = 1, averaged over all other factors, your first statment should look like:

estimate 'Marginal mean of treatment at trt=1' intercept trt 1 trt*trt 1;

Note that you cannot get an estimate of the linear effect mean independent of the quadratic because the two are continuous, and both are needed as inputs to the estimate statement. However, by adding 'solution' to the model statement, you will get the parameter estimate for each. Now that may address all of the things you are looking for in the estimate statements you have here.

I think you may want to look at differences between ages or sexes at various values of trt. Is that what you are after?

Steve Denham

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

10-27-2014 08:50 AM

Thank you very much. I'll keep that in mind.

Yes, I would like to know the estimates of the interactions, since I have found a significant effect in all these interactions. But I'm very confused with the values that I must write in the syntax of SAS based on the levels of the factors.

Thank you very much for your great help.

All the best,

Jaime

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

10-27-2014 11:32 AM

I think you may want to investigage the LSMESTIMATE statement, with the AT= option to get at what you are seeking.

The alternative is to include treatment as a classification effect, and look at the linear and quadratic effects through the LSMESTIMATE (or ESTIMATE) statement. There are extensive examples in the documentation for this. You should also look at *SAS for Mixed Models, 2nd ed.* by Littell et al.

Steve Denham