Date: Mon, 26 Feb 2007 21:05:22 +0000
Reply-To: behnaz shirazi <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: behnaz shirazi <email@example.com>
Subject: Re: Variables with 2 dataset
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
Now I want to catch sex from Agency A and sex from Agency B and compare the
of males and females within each agency.
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
>From: Melissa Ives <firstname.lastname@example.org>
>Reply-To: Melissa Ives <email@example.com>
>Subject: Re: Variables with 2 dataset
>Date: Mon, 26 Feb 2007 10:54:45 -0600
>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.
> /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.
>The bubbling brook would lose its song if you removed the rocks.
>From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
>Sent: Monday, February 26, 2007 10:10 AM
>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
>But I don't know is it possible to prepare such dataset using two other
>I wonder if you have any experience like this?
> >From: Hector Maletta <firstname.lastname@example.org>
> >Reply-To: Hector Maletta <email@example.com>
> >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!
>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!