Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- estimate statement help

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-22-2019 08:33 PM
(475 views)

Say a is 4 age groups and b is gender;

I want to compare age group 1 with age group 4 for the same gender.

I think the estimate statements below will get me the means for two groups, but I have no idea how to write the statement that compares the two. Help would be appreciated. Thank you.

Proc glm or genmod or whateverl

class a b c;

model y= a b c;

run;

estimate 'age group 1 female' int 1 a 1 0 0 0 b 0 1;

estimate 'age group 2 female' int 1 a 0 0 0 1 b 0 1;

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Since there is no interaction between age and gender, the difference between age groups will be the same for either gender. Your ESTIMATE or CONTRAST would be

estimate 'age difference' age 1 0 0 -1;

You can get this by differencing the coefficients for the 2nd ESTIMATE statement from your first. The coefficients on the intercept and on GENDER cancel out, leaving you with the coefficients above.

1 REPLY 1

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Since there is no interaction between age and gender, the difference between age groups will be the same for either gender. Your ESTIMATE or CONTRAST would be

estimate 'age difference' age 1 0 0 -1;

You can get this by differencing the coefficients for the 2nd ESTIMATE statement from your first. The coefficients on the intercept and on GENDER cancel out, leaving you with the coefficients above.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

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.