Date: Mon, 10 Feb 1997 10:21:08 -0600
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Clay Helberg <chelberg@SPSS.COM>
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
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.
* 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.
/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).
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
/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 Helberg | Internet: email@example.com
Publications Dept. | WWW: http://www.execpc.com/~helberg/
SPSS, Inc. | Speaking only for myself....