```Date: Mon, 10 Feb 1997 10:21:08 -0600 Reply-To: chelberg@spss.com Sender: "SPSSX(r) Discussion" From: Clay Helberg Organization: SPSS, Inc. Subject: Re: Ordering variables in spss bar charts Content-Type: text/plain; charset=us-ascii SNOOPY TT wrote: > > Rick, I appeciate your help, but I am trying to find a way to graph a > 'set' of variables (e.g., show the means) in either ascending or > descending order. Your > suggestion is dealing with graphing the values of a single variable. One way to deal with this involves three steps: 1) Use AGGREGATE (Data menu) to compute the means (or whatever statistics you're interested in) 2) Use the FLIP command (Transpose in the Data menu) to change variables to cases 3) Create a Pareto chart (Graph menu) using case values. Here is an example in syntax: DATA LIST /var1 1 var2 2 var3 3 group 4. BEGIN DATA 1231 3451 2341 END DATA. * Note that the value of GROUP is 1 for all cases. You have to * have a break variable for AGGREGATE, even if your cases are all one * big group. If you have multiple groups, just specify the group * identifier as the break variable, AGGREGATE will handle the rest. AGGREGATE /OUTFILE=* /BREAK=GROUP /var1_1 = MEAN(var1) /var2_1 = MEAN(var2) /var3_1 = MEAN(var3). * This part computes means for the variables. Now there is one case for * each group (in this example, just 1 case). FLIP VARIABLES=var1_1 var2_1 var3_1 . * This part transposes variables to cases and vice versa (in this * case there's only one group, so only one variable is created). Now * we can plot the Pareto chart, which orders the bars from highest to * lowest: GRAPH /PARETO (NOCUM SIMPLE)=VALUE( var001 ) BY case_lbl /TITLE= 'Means for three variables'. * You can specify multiple graphs if you have more than one break group. * END OF SYNTAX. Hope that helps.... --Clay -- Clay Helberg | Internet: helberg@execpc.com Publications Dept. | WWW: http://www.execpc.com/~helberg/ SPSS, Inc. | Speaking only for myself.... ```

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