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
- /
- Re: Estimate Statement explanation for PROC GENMODE

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-09-2019 04:51 PM
(1781 views)

I am trying to understand the model implementation to estimate the adjusted relative risk using PROC GENMOD.

The SAS technical document (https://support.sas.com/resources/papers/proceedings11/345-2011.pdf) has the following code snippet:

Proc GenMod data=StudyCohort descending;

Class SPC/param=ref ref=first;

Model Death_1year=SPC Var_1- Var_n / Dist=bin Link=log;**Estimate 'RR SPC vs. Non-SPC' SPC 1/exp;**

Run;

The Estimate statement is where I am running into trouble. All the available example and SAS documentation provide examples comparing between two groups. e.g.: this is from the SAS documents (http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_introcom_sec...),

estimate 'B at A2' b 1 -1 a*b 0 0 1 -1 ; estimate 'B at A2' b 1 -1 a*b [1 2 1] [-1 2 2];

now, the first line is conforming to positional formatting while the second line is following the nonpositional syntax.

however, another variation of estimate statement (also available on SAS doc, http://support.sas.com/kb/24/447.html😞

The ESTIMATE statement syntax enables you to specify the coefficient vector in sections as just described, with one section for each model effect:

estimate 'AB12' intercept 1 a 1 0 0 0 0 b 0 1 a*b 0 1 0 0 0 0 0 0 0 0;

Using the similarity between CONTRASTS and ESTIMATE, I could follow the logic of maintaining the positional consistency and how they correspond to the specific coefficient. However, I am not very clear on "**Estimate 'RR SPC vs. Non-SPC' SPC 1/exp;" --** what is meant by "1" for the SPC ( which is the *effect variable*). In the documents, there are two levels (0, 1) for SPC, of which the reference level is 0. This led me to assume that, there is actually 2-1 = 1 indicator variable for that comparison. And "1" is for that parameter. However, why it is not (0 1) as were presented in the other SAS documents or why intercept (1) is not included in the model -- I was not able to follow clearly. If someone can provide some explanation, that would be helpful.

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

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

2 REPLIES 2

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

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

Thank you for giving a clear explanation!

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!

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.