- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The reference category is merged into the estimate for the Intercept. For CLASS variables, you can estimate the effect of differences. For the GLM parameterization, you are measuring the difference between non-reference levels and the reference level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The reference category is merged into the estimate for the Intercept. For CLASS variables, you can estimate the effect of differences. For the GLM parameterization, you are measuring the difference between non-reference levels and the reference level.
- 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
- 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