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 (March 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 29 Mar 2007 15:05:03 -0700
Reply-To:     Hal 9000 <9000.hal@gmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Hal 9000 <9000.hal@gmail.com>
Subject:      Re: Restructuring an SPSS data file
Comments: To: la volta statistics <schmidhauser@lavolta.ch>
In-Reply-To:  <000401c771d1$8a3f0d40$1e32a8c0@lavolta.ch>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

...just be SURE that each unique value for GeoUnit has all 3 values for VarableName or you might wrongly assign values to columns. Generally, I find that assuming my data is complete and accurate is a very bad idea! -Gary

On 3/29/07, la volta statistics <schmidhauser@lavolta.ch> wrote: > > Hi Vincent > > Try the following syntax. Hope that helps. > > Christian > > DATA LIST FREE / Year(F8.0) GeoUnit(A5) DataValue(F8.2) > VariableName(A19). > BEGIN DATA > 2000 08002 7.50 NumArtsJobs2000 > 2000 08002 11404.00 NumInfoTechJobs2000 > 2000 08002 672.00 NumManuJobs2000 > 2000 08003 42.00 NumArtsJobs2000 > 2000 08003 3342.00 NumInfoTechJobs2000 > 2000 08003 1279.00 NumManuJobs2000 > 2000 08004 .00 NumArtsJobs2000 > 2000 08004 183.00 NumInfoTechJobs2000 > 2000 08004 66.00 NumManuJobs2000 > END DATA. > > > SORT CASES BY Year GeoUnit VariableName . > CASESTOVARS > /ID = GeoUnit > /drop = VariableName Year > /seperator="". > > > Rename Variable (DataValue1 DataValue2 DataValue3 = NumArtsJobs2000 > NumInfoTechJobs2000 NumManuJobs2000). > > > > ******************************* > la volta statistics > Christian Schmidhauser, Dr.phil.II > Weinbergstrasse 108 > Ch-8006 Zürich > Tel: +41 (043) 233 98 01 > Fax: +41 (043) 233 98 02 > email: mailto:schmidhauser@lavolta.ch > internet: http://www.lavolta.ch/ > > > -----Ursprüngliche Nachricht----- > Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]Im Auftrag von > Vincent Louis > Gesendet: Mittwoch, 28. März 2007 22:56 > An: SPSSX-L@LISTSERV.UGA.EDU > Betreff: Restructuring an SPSS data file > > > Hi Everyone, > I am trying to write an SPSS syntax to restructure a file that > contains the following information: > > Year GeoUnit DataValue VariableName > > 2000 08002 7.50 NumArtsJobs2000 > 2000 08002 11404.00 NumInfoTechJobs2000 > 2000 08002 672.00 NumManuJobs2000 > 2000 08003 42.00 NumArtsJobs2000 > 2000 08003 3342.00 NumInfoTechJobs2000 > 2000 08003 1279.00 NumManuJobs2000 > 2000 08004 .00 NumArtsJobs2000 > 2000 08004 183.00 NumInfoTechJobs2000 > 2000 08004 66.00 NumManuJobs2000 > > The file that I ultimate want should consist of the above information, > but in the following structure: > > GeoUnit NumArtsJobs2000 > NumInfoTechJobs2000 NumInfoTechJobs2000 > > 08002 7.50 11404.00 > 672.00 > 08003 42.00 3342.00 > 1279.00 > 08004 .00 183.00 > 66.00 > > I would appreciate any help you may be able to provide to assist me in > reconfiguring the data. > > Thank you in advance, > Vincent >


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