LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Apr 2011 12:34:41 -0500
Reply-To:     Robin R High <rhigh@UNMC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin R High <rhigh@UNMC.EDU>
Subject:      Re: Summary stat in group axis label
Comments: To: "Marc F. LoGrasso, Ph.D." <mlograsso@BRYANTSTRATTON.EDU>
In-Reply-To:  <201104211513.p3LEjaRm015916@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Marc,

You can embellish a format the variable for session, something like this with numeric codes (though not quite the same situation as your question, it illustrates some key ideas that could be modified to make it work):

proc format; value gd 1='Female' 2='Male'; value wg 0='LT 100' 1='GE 100'; run;

DATA cls; SET sashelp.class; label sex='Gender'; keep gnd wgt height; wgt = (weight GE 100); gnd = (Sex='M') +1 ;

proc means data=cls nway noprint; class gnd ; var height; output out=mns(drop=_type_ _freq_) mean=Hmn; run;

proc print; run;

proc sort data=mns; by gnd; proc print data=mns label NOObs; run;

data f; set mns end=eof; length label $35; retain fmtname "wght" type 'n'; rename gnd = start; end=gnd; label = catt(put(gnd,gd.),' (mean=',left(ROUND(Hmn,.1)),')'); run;

proc print; run;

proc format cntlin=f; run;

PROC gchart DATA=cls ; vbar wgt / noframe discrete group=gnd sumvar=height type=mean space=5 width=12; format gnd wght. wgt wg. ; TITLE 'Summary stats for Height on Haxis format'; label wgt='Weight Category' gnd='Sex'; run; quit;

Robin High UNMC

From: "Marc F. LoGrasso, Ph.D." <mlograsso@BRYANTSTRATTON.EDU> To: SAS-L@LISTSERV.UGA.EDU Date: 04/21/2011 10:32 AM Subject: Summary stat in group axis label Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>

I am in the process of analyzing survey data over a large number of levels (I need to present separate results for senior management for four separate sessions of an activity at 17 campuses with day and evening presentations of each session). One of the items they have liked in the past is when I group multiple items on a bar chart, so I try to accommodate that preference when I can. I'm currently using PROC GCHART and VBAR to make my charts. My BY groups are Campus, Question, and Time; and I am using Session as my GROUP variable. Currently, my horizontal axis looks like this (question responses were scaled from 1 to 5):

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Session 1 Session 2 Session 3 Session 4

I would like it to look like this:

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Session 1 Session 2 Session 3 Session 4 (mean = a) (mean = b) (mean = c) (mean = d)

I am currently using SAS EG 4.3 (with SAS 9.2), but I am comfortable manipulating the underlying code generated by the EG when I need to do so.

Thank you for any help you can provide.


Back to: Top of message | Previous page | Main SAS-L page