Programming the statistical procedures from SAS

95% CONFIDENCE INTERVALS FOR PROC GLM WITH CONTRASTS

Reply
New Contributor
Posts: 4

95% CONFIDENCE INTERVALS FOR PROC GLM WITH CONTRASTS

Hello there!

i am using proc glm with contrast to compare three means (i.e., one-way anova). see my SAS code:

SAS CODE
proc glm data=ITT; class group; model BMD=group; means group;
contrast 'A>B>C: A vs B' group 1 -1 0;
contrast 'A>B>C: B vs C' group 0 1 -1;
contrast 'A>B>C: C vs A' group 1 0 -1;
contrast 'A=B>C: A+B vs C' group 1 1 -2; run; quit;

This produces output with:
1) a p-value for the three-way comparison,
2) means for each group and their corresponding SDs
3) a mean square and p-value for each contrast

I would also like to obtain:
1) means for each group and their corresponding 95% confidence intervals (instead SDs)
2) differences between the means and the corresponding 95% confidence intervals for the differences between the means. Is it possible to obtain this using contrasts?

Please and thank you help me. Luba Smiley Happy
Valued Guide
Valued Guide
Posts: 684

Re: 95% CONFIDENCE INTERVALS FOR PROC GLM WITH CONTRASTS

You would be better off using LSMEANS rather than MEANS statement (under most circumstances). Then your request is also easy:
lsmeans group / cl pdiff;
will give you confidence limits and all possible pair-wise differences.
Ask a Question
Discussion stats
  • 1 reply
  • 2514 views
  • 0 likes
  • 2 in conversation