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 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 26 Jun 2002 21:25:30 -0400
Reply-To:   Art@DrKendall.org
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "Arthur J. Kendall" <Arthur.Kendall@VERIZON.NET>
Subject:   Re: Creating a matrix from two variables...
Comments:   To: "Patrick E. Burns" <patrickburns@economicrt.org>
Content-Type:   text/plain; charset=us-ascii

Quick and dirty if you are hady with a wordprocessing program. If you just want it for display crosstabs tables= sic_code by occ_code /cells=count/statistics=none. crosstabs tables= sic_code by occ_code /cells=column /statistics=none. then cut and paste into your favorite wordprocessing program. you probably want to use a fixed font. (you might want to do draft output depending on how your wordprocessing program works). If you want to make it a data file, set the table look under <options> <pivot table> to "report" so there isn't a lot to remove. "Patrick E. Burns" wrote:

> Dear SPSS'ers, > > I have two very long columns of data that I am seeking to > restructure/aggregate into a matrix of sorts. The data looks like this: > > "sic_code" "occ_code" > 0111 111140 > 0111 111140 > 0111 111140 > 0112 111140 > 0112 111140 > 0112 111140 > 0112 111160 > 0112 111160 > 0112 111160 > 0112 111160 > 0112 111160 > 0112 111160 > 0115 111110 > 0115 111110 > 0115 111150 > 0115 111150 > 0115 111150 > 0115 111150 > 0115 111150 > 0115 111150 > 0116 111110 > 0119 111120 > 0119 111120 > 0119 111120 > > I would like to create two databases from this original data set, one > capturing the raw cross-tab counts between the two variables, and another > capturing the column frequency percentages. They would look like this: > > sic_code 111110 111120 111140 111150 111160 > 0111 0 0 3 0 > 0 > 0112 0 0 3 0 > 6 > 0115 2 0 0 6 > 0 > 0116 1 0 0 0 > 0 > 0119 0 3 0 0 > 0 > > sic_code 111110 111120 111140 111150 111160 > 0111 0 0 .5 0 > 0 > 0112 0 0 .5 0 > 1.0 > 0115 .66 0 0 1.0 > 0 > 0116 .33 0 0 0 > 0 > 0119 0 1.0 0 0 > 0 > > What is the best way to go about this aggregation/restructuring of a database? > > PATRICK > > Patrick Burns, Senior Researcher > Economic Roundtable > Los Angeles > Email: patrickburns@economicrt.org > http://www.economicrt.org


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