Merge, Update, or Quit For the Day?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Merge, Update, or Quit For the Day?

Bill Oglesby
Good Afternoon,

I am an SPSS newbie and am probably making this harder than it needs to be: I have repeatedly
attempted to merge two disparate .sav files together, keyed off of a single, shared identifier (i.e.,
both files contain the same students identified by SSN). One file is unduplicated, with its own set of
variables, and the other is duplicated (i.e., by classes taken in a given semester) with its own set of
variables. What I would like to do is to merge these two -- the unduplicated into the duplicated file -
- so that there are no missing data. Any ideas would be greatly appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Merge, Update, or Quit For the Day?

Art Kendall
If by unduplicated you mean that each SSN occurs once, see if something
like this untested syntax does what you want.
dataset activate students.
sort cases by SSN.
dataset activate classes.
sort cases by SSN.
dataset declare matched.
match files file= classes /table=students /by SSN.
dataset activate matched.

Art Kendall
Social Research Consultants

William Oglesby, Psy.D. wrote:

> Good Afternoon,
>
> I am an SPSS newbie and am probably making this harder than it needs to be: I have repeatedly
> attempted to merge two disparate .sav files together, keyed off of a single, shared identifier (i.e.,
> both files contain the same students identified by SSN). One file is unduplicated, with its own set of
> variables, and the other is duplicated (i.e., by classes taken in a given semester) with its own set of
> variables. What I would like to do is to merge these two -- the unduplicated into the duplicated file -
> - so that there are no missing data. Any ideas would be greatly appreciated.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Merge, Update, or Quit For the Day?

Garry Gelade
In reply to this post by Bill Oglesby
William this should be very easy. Make sure both files are sorted by SSN
ascending.  Start with the DUPLICATED file in the data editor, and then
select Data->Merge Files-> Add variables. Browse to your unduplicated file
in the dialog box, and continue. Move SSN into the Key Variables box, tick
"Match cases on key variables in sortd files", select "Non-active is keyed
table", and go.

If it doesn't work, send your error message to the list.

Garry Gelade

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
William Oglesby, Psy.D.
Sent: 24 September 2008 22:07
To: [hidden email]
Subject: Merge, Update, or Quit For the Day?

Good Afternoon,

I am an SPSS newbie and am probably making this harder than it needs to be:
I have repeatedly attempted to merge two disparate .sav files together,
keyed off of a single, shared identifier (i.e., both files contain the same
students identified by SSN). One file is unduplicated, with its own set of
variables, and the other is duplicated (i.e., by classes taken in a given
semester) with its own set of variables. What I would like to do is to merge
these two -- the unduplicated into the duplicated file -
- so that there are no missing data. Any ideas would be greatly appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

__________ NOD32 3469 (20080924) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Merge, Update, or Quit For the Day?

Bill Oglesby
In reply to this post by Bill Oglesby
My thanks to those of you who replied. In the end, Garry's solution proved the easiest and the
quickest.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD