BookmarkSubscribeRSS Feed
cpeloquin
Fluorite | Level 6

i have a 3-level categorical character variable DOSE.

 

values are:

  • 1-5
  • 6-12
  • 13+

i would like to get estimates and 95% confidence intervals for "6-12" and 13+" where "1-5" is the reference group. what would be the syntax of the ESTIMATE statement?

 

many thanks for your help.

Christine

4 REPLIES 4
ballardw
Super User

Confidence interval has no meaning when discussing character variables. If you mean CI of a different numeric variable for each level of a character variable that is doable. Since reference an Estimate statement then perhaps you can share the current procedure code so we have some chance of seeing what other variables you are using.

PaigeMiller
Diamond | Level 26

@cpeloquin wrote:

i would like to get estimates and 95% confidence intervals for "6-12" and 13+" where "1-5" is the reference group. what would be the syntax of the ESTIMATE statement?

 


Assuming you really mean that you want 95% confidence intervals for the estimated model coefficients of "6-12" and 13+", these are given by default from PROC GENMOD, as can be seen in this example: 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_genmod_examples04.htm

 

If you want to compare these statistically, and get confidence intervals for the difference, you can get this from the LSMEANS statement with the CL option.


If that's not what you mean, then please explain further.

--
Paige Miller
StatDave
SAS Super FREQ

This should be posted in the Statistical Procedures Community rather than here. However, regardless of the distribution of your actual response variable, you can get the mean of it at each level of your Dose variable by specifying it the LSMEANS statement. Do not use the ESTIMATE statement. Make sure that Dose appears in the CLASS statement. Add the ILINK and CL options which will add columns in the LSMEANS table labeled "Mean" which has the mean estimate and confidence limits. For example:

 

lsmeans dose / ilink cl;

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1939 views
  • 4 likes
  • 5 in conversation