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 (June 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Jun 2006 21:22:54 +0200
Reply-To:     =?us-ascii?Q?Jerabek=20Jindrich?= <JindraJerabek@seznam.cz>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         =?us-ascii?Q?Jerabek=20Jindrich?= <JindraJerabek@seznam.cz>
Subject:      =?us-ascii?Q?Re=3ASort=20Multiple=20response=20tables=20by=20descending=20counts?=
Comments: To: Patricia.Cleland@edu.gov.on.ca
In-Reply-To:  <72A5DBEDEA97FA4A939074F676F6198B1039BF57@cscptomomxis001.csc.ad.gov.on.ca>
Content-Type: text/plain; charset="us-ascii"

> I have a data set with a number of multiple response variables. For > example, respondents were asked to indicate the three sources of data they > used when making a decision. > Is there a way to format the table by descending > counts rather than by ascending order, similar to the simple FORMAT > subcommand on FREQUENCY?

Hello,

Yes, just add subcommand "SORT = D VarName". Here is the syntax to produce the sorted table:

TABLES /FORMAT BLANK MISSING('') /MRGROUP $Data_Sources 'Sources of'+ ' Information' Source_1 Source_2 Source_3 /GBASE=CASES /TABLE=$Data_Sources BY (STATISTICS) /STATISTICS count( $Data_Sources ( F5.0 ) 'Count') cpct( $Data_Sources ( F6.1 ) 'Column %') /SORT = D $Data_Sources /TITLE ' Q12: Top 3 Sources of Data'.

HTH Jindra

> I have a data set with a number of multiple response variables. For > example, respondents were asked to indicate the three sources of data they > used when making a decision. > Is there a way to format the table by descending > counts rather than by ascending order, similar to the simple FORMAT > subcommand on FREQUENCY?

> Below is the syntax and output: > > * Multiple Response Tables . > TABLES > /FORMAT BLANK MISSING('') /MRGROUP $Data_Sources 'Sources of'+ > ' Information' Source_1 Source_2 Source_3 > /GBASE=CASES > /TABLE=$Data_Sources BY (STATISTICS) > /STATISTICS > count( $Data_Sources ( F5.0 ) 'Count') > cpct( $Data_Sources ( F6.1 ) 'Column %') /TITLE ' Q12: Top 3 Sources of'+ > ' Data''. > > Q12: Top 3 Data Sources > > Count Column % > 1 Source1 1020 59.9 > 2 Source2 954 56.0 > 3 Source3 834 49.0 > 4 Source4 1211 71.1 > 5 Source5 655 38.5 > 6 Source6 193 11.3 > 7 Source7 147 8.6 > > As you can see, Source4 is the most frequent data source, followed by > Source1 and Source2. Is there a way to format the table by descending > counts rather than by ascending order, similar to the simple FORMAT > subcommand on FREQUENCY? > > > Pat > > -------------------------------- > Patricia Cleland > Senior Statistical and Research Analyst > Policy and Program Branch > Ministry of Education > > 15th Floor, Mowat Block > 900 Bay Street > Toronto, Ontario > M7A 1L2 > > phone: 416-325-2697 > fax: 416-325-4344 > > >


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