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 (February 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 26 Feb 2007 21:05:22 +0000
Reply-To:     behnaz shirazi <mehr59@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         behnaz shirazi <mehr59@hotmail.com>
Subject:      Re: Variables with 2 dataset
Comments: To: mives@chestnut.org
In-Reply-To:  <820E5CA81E7A2544A9D7E0A25025E481A91701@e2k0305.chestnut.net>
Content-Type: text/plain; format=flowed

Thank you Melissa and Hector,

I guess I couldn't expalin very well the situation.OK I will start again:

I have two dataset : Agency A , Agency B They have the same number of variables with the same name.For example:

Agency A Agency B Agency Name Agency Name Sex Sex Date Date .... ....

Now I want to catch sex from Agency A and sex from Agency B and compare the percentage of males and females within each agency.

AgencyA AgencyB Male 80% Male 30% Feamle 20% Female 70%

Now I am running code separately for each agency.I wonder can I catch desirable variables like Sex from each agency and put them in one single spss table?

I hope this time I could explain better.

Thanks for your help Behnaz

>From: Melissa Ives <mives@chestnut.org> >Reply-To: Melissa Ives <mives@chestnut.org> >To: SPSSX-L@LISTSERV.UGA.EDU >Subject: Re: Variables with 2 dataset >Date: Mon, 26 Feb 2007 10:54:45 -0600 > >Behnaz, > >Use Add files to concatenate datasets vertically (add new records) and >Match files to concatenate horizontally (add new variables. Use the >/IN= subcommand to identify the agency (you can recode this later to >whatever you want if 1/0 variables are uncomfortable). Using the /BY=ID >subcommand will sort them by id, but is not necessary. > >ADD FILES > /FILE 'DATASET A.SAV'/IN=Agency > /FILE 'DATASET B.SAV'. >SAVE OUTFILE 'MERGED.SAV'. > >Var labels Agency 1 'Agency A' 0 'Agency B'. > >Then run your comparisons by agency. > >Melissa >The bubbling brook would lose its song if you removed the rocks. > > >-----Original Message----- >From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of >behnaz shirazi >Sent: Monday, February 26, 2007 10:10 AM >To: SPSSX-L@LISTSERV.UGA.EDU >Subject: Re: [SPSSX-L] Variables with 2 dataset > >Thank you Hector >But my case is diferent.I have two agencies for example A and B which >the number of variables can be different in each dataset and for example >I want to compare percent of sex in Agency A with Agency B.At the moment >I run different syntax code and I get different output and then I put >values in my powerpoint graph.I want to automate this process and for >this ,frist I have to catch my variables from these two dataset in one >dataset or in on single spss table.After that I can use it in access and >have charts >easily.(Automatic) >But I don't know is it possible to prepare such dataset using two other >dataset? > >I wonder if you have any experience like this? > >Thank you >Behnaz Shirazi > > > >From: Hector Maletta <hmaletta@fibertel.com.ar> > >Reply-To: Hector Maletta <hmaletta@fibertel.com.ar> > >To: SPSSX-L@LISTSERV.UGA.EDU > >Subject: Re: Variables with 2 dataset > >Date: Sun, 25 Feb 2007 20:07:10 +0100 > > > > Behnaz, > > SPSS datasets refer to certain UNITS or CASES. For your > >variables to be put in the same dataset, they should refer to the same > >units, for example the same persons. May be you have their AGE in one > >data set, and their INCOME in another, and you want both age and income > > >in the same dataset. > > If that is your problem, then you may have two situations: > > 1. Both datasets include EXACTLY the same cases, in EXACTLY > >the same order. The first case in one dataset is also the first case in > > >the other, the second is the second, and so on. If that is the case, > >you may use the MATCH FILES command (or the menu DATA-MERGE FILES-ADD > >VARIABLES) without specifying an ID variable. > > 2. Both datasets include the same cases, but not necessarily > >in the same order, and they may include also other cases. If so, you > >need both datasets to have a common variable to serve as an ID. An ID > >variable has a unique value for each case, and this value is the same > >in both datasets. > >Then you may apply the MATCH FILES command, or the same menu options > >mentioned before, but using the ID variable to match each case in one > >dataset with the corresponding case in the other one. However, both > >datasets should previously be SORTED by ID. Example: > > > > GET FILE 'DATASET A.SAV'. > > SORT CASES BY ID. > > SAVE FILE 'DATASET A.SAV'. > > > > GET FILE 'DATASET B.SAV'. > > SORT CASES BY ID. > > SAVE FILE 'DATASET B.SAV'. > > > > MATCH FILES /FILE 'DATASET A.SAV'/FILE 'DATASET B.SAV'/BY ID. > > SAVE OUTFILE 'MERGED.SAV'. > > > > Hector > > > > -----Mensaje original----- > >De: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] En nombre de > >behnaz shirazi Enviado el: 25 February 2007 19:49 > >Para: SPSSX-L@LISTSERV.UGA.EDU > >Asunto: Variables with 2 dataset > > > > Hello Dear All, > > > > I had a question! I want to get some variables from one > >dataset and some > > other variables from the other dataset and at the end I put > >all of these > > variables in a single spss table.I wonder is it possible?! > > If so , how can I do this. > > > > If you can guide me you helped me a lot. > > > > > > Thank you > > Behnaz > > > > >_________________________________________________________________ > > FREE pop-up blocking with the new MSN Toolbar - get it now! > > http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >PRIVILEGED AND CONFIDENTIAL INFORMATION >This transmittal and any attachments may contain PRIVILEGED AND >CONFIDENTIAL information and is intended only for the use of the >addressee. If you are not the designated recipient, or an employee >or agent authorized to deliver such transmittals to the designated >recipient, you are hereby notified that any dissemination, >copying or publication of this transmittal is strictly prohibited. If >you have received this transmittal in error, please notify us >immediately by replying to the sender and delete this copy from your >system. You may also call us at (309) 827-6026 for assistance.

_________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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