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: How to estimate standard error for the reference category in proc ...

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 03-02-2021 09:19 PM
(992 views)

I use proc glm to find the estimates for a categorical variable with 3 levels; rs1 : {1,2,3}

I have identified level 1 as the reference category. I would like to find the standard error for the reference category

so that I could form CIs for it as well.

I use the following code:

```
PROC GLM DATA=AllData PLOTS=NONE;
CLASS rs1(ref = '1');
MODEL nmr_acace = rs1 /CLPARM SOLUTION E;
estimate 'rs1 1' intercept 1 rs1 1 0 0 ;
QUIT;
```

I get the following results:

Estimate standard error rs1 0 0.007628342 0.00335261 rs1 2 -0.000113952 0.00833655 rs1 1 0.000 . Estimate standard error rs1 1 3.05314364 0.00183197

I do not know how to interpret the estimate for rs1 = 1 being 3.053. I was hoping to have it as 0 and by the standard error find the confidence intervals for it.

1 ACCEPTED SOLUTION

Accepted Solutions

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

4 REPLIES 4

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

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

Like @Rick_SAS pointed out, the estimates in the Parameter Estimates table have interpretations that might not be what you think.

You did not capture the estimate for Intercept in the Parameter Estimates table, which is important. Please refer to the following usage note for more explanations --

https://support.sas.com/kb/38/384.html

Your ESTIMATE statement estimates the response for the first level, which is level 0. If you want to estimate the response for the reference level (which is also the estimate for Intercept in the Parameter Estimates table), you should use --

estimate 'rs1 1' intercept 1 rs1 0 0 1;

Hope this helps.

Jill

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

I am designing a macro which could calculate the group means and SEs for a linear regression with categorical exposures. Is there any other way to find the group estimates, as it is hard to adjust the estimate statement when we have different number of categories?

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

Look into the LSMEANS statement - that will give you means and SE's. With on ODS OUTPUT statement, you can put those into a dataset. No direct need for a macro.

SteveDenham

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.