Joining two files

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

Joining two files

Kuiama Thompson

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

 

Thanks,

Kuiama Thompson

 

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

Reply | Threaded
Open this post in threaded view
|

Re: Joining two files

Art Kendall
try something like this untested syntax.

dataset activate people.
sort cases by postcode.
dataset activate postcodes.
sort cases by postcode.
match files file=people /table=postcodes /by postcode.


Art Kendall
Social Research Consultants

Kuiama Thompson wrote:

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

 

Thanks,

Kuiama Thompson

 

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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: Joining two files

Christopher Stride
In reply to this post by Kuiama Thompson
Hi Kuaima
You need a 'table' (one to many) match - rather than the usual

match files file = <file1>
/file = <file2>
/by...

syntax, you would use

match files file = <file1>
/table = <file2>
/by...

The usual rules re: sorting on the BY (matching) variable (i.e.
postcode) apply, and you can't have dups on the BY variable in both
files - only on the 'table' file

cheers
Chris



Kuiama Thompson wrote:

>
> I have a data set which contains people’s details, including postcodes
> and another dataset which contains postcodes and characteristics of
> that postcode. The first dataset may have two more than one occurrence
> of the same postcode. I want to apply the postcode characteristics
> from the second file to the corresponding records in the first file.
> Is this possible and if so how?
>
> Thanks,
>
> *Kuiama Thompson*
>
> DISCLAIMER:
> This email has been scanned for viruses, however we are unable to
> accept responsibility for any damage caused by the contents. The
> opinions expressed in this email represent the views of the sender,
> not Salford PCT unless explicitly stated. If you have received this
> email in error please notify the sender. The information contained in
> this email may be subject to public disclosure under the NHS Code of
> Openness or the Freedom of Information Act 2000. Unless the
> information is legally exempt from disclosure, the confidentiality of
> this e-mail and your reply cannot be guaranteed.
>

--
Dr Chris Stride, C. Stat,
Statistician, Institute of Work Psychology, University of Sheffield
Telephone: 0114 2223262
Fax: 0114 2727206

“Figure It Out”
Statistical Consultancy and Training Service for Social Scientists

Visit www.figureitout.org.uk for details of my consultancy services,
and forthcoming training courses in June 2010:
 - Multiple Regression using SPSS
 - Multilevel Modelling using SPSS
 - Structural Equation Modelling using MPlus
as part of the IWP Conference 2010

=====================
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: Joining two files

John F Hall
In reply to this post by Kuiama Thompson
Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?
----- Original Message -----
Sent: Monday, December 21, 2009 2:43 PM
Subject: Joining two files

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

 

Thanks,

Kuiama Thompson

 

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

Reply | Threaded
Open this post in threaded view
|

Re: Joining two files

Art Kendall
Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:
Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?
----- Original Message -----
Sent: Monday, December 21, 2009 2:43 PM
Subject: Joining two files

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

 

Thanks,

Kuiama Thompson

 

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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: Joining two files

John F Hall
Short UK postcodes (eg my old address in London was N22) are the nearest equivalent of US zipcodes.  Full UK postcodes (eg N22 5HJ) refer to groups of around 12 addresses and could permit identification of respondents, hence the query.  Judging from the email address Kuaima seems to be based in the National Health Service, so will be covered by the Data Protection Act which is designed to protect personal information from unauthorised access or accidental disclosure.
 
Codes of Conduct of the British Sociological Association, the Market Research Society and the Social Research Association require identities of respondents to be kept separate from their personal data from eg questionnaires. 
 
Similar constraints apply to small electoral districts, which is why many data sets, including the Census, have such data stripped off or aggregated in order to prevent accidental or unauthorised identification of respondents.
 
For the same reason, names, addresses and phone numbers should NEVER appear on questionnaires, but be kept on a separate list (preferably by a separate research section) together with serial numbers, to be used only for essential follow-up, and destroyed on completion of the research.
----- Original Message -----
Sent: Monday, December 21, 2009 10:56 PM
Subject: Re: Joining two files

Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:
Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?
----- Original Message -----
Sent: Monday, December 21, 2009 2:43 PM
Subject: Joining two files

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

Thanks,

Kuiama Thompson

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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: Joining two files

John McConnell-2

As an aside to this there has also been a campaign here in the UK to make the link between postcodes and actual locations available. Up until now companies who have access to that data have been charging for it.

 

It looks like that is about to end…

 

http://news.bbc.co.uk/1/hi/technology/8402327.stm

 

Of course the personal Data Protection rules John refers to still apply

 

Regards

 

John

John McConnell

analytical people
500 Chiswick High Road
London
W4 5RG, United Kingdom

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: 22 December 2009 06:15
To: [hidden email]
Subject: Re: Joining two files

 

Short UK postcodes (eg my old address in London was N22) are the nearest equivalent of US zipcodes.  Full UK postcodes (eg N22 5HJ) refer to groups of around 12 addresses and could permit identification of respondents, hence the query.  Judging from the email address Kuaima seems to be based in the National Health Service, so will be covered by the Data Protection Act which is designed to protect personal information from unauthorised access or accidental disclosure.

 

Codes of Conduct of the British Sociological Association, the Market Research Society and the Social Research Association require identities of respondents to be kept separate from their personal data from eg questionnaires. 

 

Similar constraints apply to small electoral districts, which is why many data sets, including the Census, have such data stripped off or aggregated in order to prevent accidental or unauthorised identification of respondents.

 

For the same reason, names, addresses and phone numbers should NEVER appear on questionnaires, but be kept on a separate list (preferably by a separate research section) together with serial numbers, to be used only for essential follow-up, and destroyed on completion of the research.

----- Original Message -----

Sent: Monday, December 21, 2009 10:56 PM

Subject: Re: Joining two files

 

Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:

Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?

----- Original Message -----

Sent: Monday, December 21, 2009 2:43 PM

Subject: Joining two files

 

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

Thanks,

Kuiama Thompson


DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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: Joining two files

Muir Houston-2
It sounds like the poster is trying to map some form of geodemographic classification system to the data - something perhaps like Mosaic or ACORN (both commercial but I think UK academics are allowed access and use) or, the publicly available deprivation and local neighbourhood stats - the system used here in Scotland is different from that in the rest of the UK I think (not sure about Wales)
 
in fact HESA use a system called POLAR to classify low participation neighbourhoods for performance indicators on WP and access.
 
cheers
Muir
 

Dr Muir Houston
Lecturer
DACE
Faculty of Education
University of Glasgow
0141-330-4699

 
 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John McConnell
Sent: 22 December 2009 08:24
To: [hidden email]
Subject: Re: Joining two files

As an aside to this there has also been a campaign here in the UK to make the link between postcodes and actual locations available. Up until now companies who have access to that data have been charging for it.

 

It looks like that is about to end…

 

http://news.bbc.co.uk/1/hi/technology/8402327.stm

 

Of course the personal Data Protection rules John refers to still apply

 

Regards

 

John

John McConnell

analytical people
500 Chiswick High Road
London
W4 5RG, United Kingdom

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: 22 December 2009 06:15
To: [hidden email]
Subject: Re: Joining two files

 

Short UK postcodes (eg my old address in London was N22) are the nearest equivalent of US zipcodes.  Full UK postcodes (eg N22 5HJ) refer to groups of around 12 addresses and could permit identification of respondents, hence the query.  Judging from the email address Kuaima seems to be based in the National Health Service, so will be covered by the Data Protection Act which is designed to protect personal information from unauthorised access or accidental disclosure.

 

Codes of Conduct of the British Sociological Association, the Market Research Society and the Social Research Association require identities of respondents to be kept separate from their personal data from eg questionnaires. 

 

Similar constraints apply to small electoral districts, which is why many data sets, including the Census, have such data stripped off or aggregated in order to prevent accidental or unauthorised identification of respondents.

 

For the same reason, names, addresses and phone numbers should NEVER appear on questionnaires, but be kept on a separate list (preferably by a separate research section) together with serial numbers, to be used only for essential follow-up, and destroyed on completion of the research.

----- Original Message -----

Sent: Monday, December 21, 2009 10:56 PM

Subject: Re: Joining two files

 

Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:

Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?

----- Original Message -----

Sent: Monday, December 21, 2009 2:43 PM

Subject: Joining two files

 

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

Thanks,

Kuiama Thompson


DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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: Joining two files

Dean Tindall

If you have a unique variable common to both data sets, then I find it easier to do a vlookup in excel, match up the files, and then reopen the data in spss

 

 

Dean Tindall
Junior Analyst


t: +44 (0) 845 372 0101
f: +44 (0) 845 372 0102

www.nunwood.com

 

EXPLOR Award Winners – Nunwood: Fizz IIR (2009)

'Best Agency' MRS / Research (2008 & 2004)
'Agency of the Year' Marketing magazine (2007, 2005 & 2004)
'Marketing Company of the Year' Drum Awards (2009 & 2008)

 

London – Leeds – New York

 

London - Leeds - New York

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Muir Houston
Sent: 22 December 2009 11:52
To: [hidden email]
Subject: Re: Joining two files

 

It sounds like the poster is trying to map some form of geodemographic classification system to the data - something perhaps like Mosaic or ACORN (both commercial but I think UK academics are allowed access and use) or, the publicly available deprivation and local neighbourhood stats - the system used here in Scotland is different from that in the rest of the UK I think (not sure about Wales)

 

in fact HESA use a system called POLAR to classify low participation neighbourhoods for performance indicators on WP and access.

 

cheers

Muir

 

Dr Muir Houston
Lecturer
DACE
Faculty of Education
University of Glasgow
0141-330-4699

 

 

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John McConnell
Sent: 22 December 2009 08:24
To: [hidden email]
Subject: Re: Joining two files

As an aside to this there has also been a campaign here in the UK to make the link between postcodes and actual locations available. Up until now companies who have access to that data have been charging for it.

 

It looks like that is about to end…

 

http://news.bbc.co.uk/1/hi/technology/8402327.stm

 

Of course the personal Data Protection rules John refers to still apply

 

Regards

 

John

John McConnell

analytical people
500 Chiswick High Road
London
W4 5RG, United Kingdom

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: 22 December 2009 06:15
To: [hidden email]
Subject: Re: Joining two files

 

Short UK postcodes (eg my old address in London was N22) are the nearest equivalent of US zipcodes.  Full UK postcodes (eg N22 5HJ) refer to groups of around 12 addresses and could permit identification of respondents, hence the query.  Judging from the email address Kuaima seems to be based in the National Health Service, so will be covered by the Data Protection Act which is designed to protect personal information from unauthorised access or accidental disclosure.

 

Codes of Conduct of the British Sociological Association, the Market Research Society and the Social Research Association require identities of respondents to be kept separate from their personal data from eg questionnaires. 

 

Similar constraints apply to small electoral districts, which is why many data sets, including the Census, have such data stripped off or aggregated in order to prevent accidental or unauthorised identification of respondents.

 

For the same reason, names, addresses and phone numbers should NEVER appear on questionnaires, but be kept on a separate list (preferably by a separate research section) together with serial numbers, to be used only for essential follow-up, and destroyed on completion of the research.

----- Original Message -----

Sent: Monday, December 21, 2009 10:56 PM

Subject: Re: Joining two files

 

Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:

Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?

----- Original Message -----

Sent: Monday, December 21, 2009 2:43 PM

Subject: Joining two files

 

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

Thanks,

Kuiama Thompson

DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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

This email was sent from:- Nunwood Consulting Ltd. (registered in England and Wales no. 3135953) whose head office is based at:- 7, Airport West, Lancaster Way, Yeadon, Leeds, LS19 7ZA. Tel +44 (0) 845 372 0101 Fax +44 (0) 845 372 0102 Web http://www.nunwood.com Email [hidden email] This e-mail is confidential and intended solely for the use of the individual(s) to whom it is addressed. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, copying of, or any action taken in reliance upon it, is strictly prohibited and may be illegal. To review our privacy policy please visit: www.nunwood.com/privacypolicy.html
Reply | Threaded
Open this post in threaded view
|

Re: Joining two files

Bruce Weaver
Administrator
Dean Tindall wrote
If you have a unique variable common to both data sets, then I find it
easier to do a vlookup in excel, match up the files, and then reopen the
data in spss
You find that easier than:

match files
 file='people' /
 table='postcodes' /
 by postcode.
exe.

Really?  Even if you do, it sounds like you're introducing manual procedures, which are a nuisance if you have to redo the analysis (e.g., after fixing data entry errors).  

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Joining two files

Art Kendall
Do you have many occasions when you do not redo an analysis?

Art

Bruce Weaver wrote:
Dean Tindall wrote:
  
If you have a unique variable common to both data sets, then I find it
easier to do a vlookup in excel, match up the files, and then reopen the
data in spss

    

You find that easier than:

match files
 file='people' /
 table='postcodes' /
 by postcode.
exe.

Really?  Even if you do, it sounds like you're introducing manual
procedures, which are a nuisance if you have to redo the analysis (e.g.,
after fixing data entry errors).



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://old.nabble.com/Joining-two-files-tp26874151p26888730.html
Sent from the SPSSX Discussion mailing list archive at Nabble.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

  
===================== 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: Joining two files

Christopher Stride
In reply to this post by Bruce Weaver
and manual procedures by definition tend to be less systematic / more
adhoc than programming - hence if errors are made, they are often harder
to spot too...

Bruce Weaver wrote:

> Dean Tindall wrote:
>
>> If you have a unique variable common to both data sets, then I find it
>> easier to do a vlookup in excel, match up the files, and then reopen the
>> data in spss
>>
>>
>
> You find that easier than:
>
> match files
>  file='people' /
>  table='postcodes' /
>  by postcode.
> exe.
>
> Really?  Even if you do, it sounds like you're introducing manual
> procedures, which are a nuisance if you have to redo the analysis (e.g.,
> after fixing data entry errors).
>





>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
> "When all else fails, RTFM."
>
> NOTE:  My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
> --
> View this message in context: http://old.nabble.com/Joining-two-files-tp26874151p26888730.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.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
>

--
Dr Chris Stride, C. Stat,
Statistician, Institute of Work Psychology, University of Sheffield
Telephone: 0114 2223262
Fax: 0114 2727206

“Figure It Out”
Statistical Consultancy and Training Service for Social Scientists

Visit www.figureitout.org.uk for details of my consultancy services,
and forthcoming training courses in June 2010:
 - Multiple Regression using SPSS
 - Multilevel Modelling using SPSS
 - Structural Equation Modelling using MPlus
as part of the IWP Conference 2010

=====================
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: Joining two files

Dean Tindall
In reply to this post by Art Kendall

It is not often that I am combining files mid analysis tbh, If I have combined files then I will usually create a saved version of the new combined file in order to perform a repeat analysis upon

 

Dean Tindall
Junior Analyst


t: +44 (0) 845 372 0101
f: +44 (0) 845 372 0102

www.nunwood.com

 

EXPLOR Award Winners – Nunwood: Fizz IIR (2009)

'Best Agency' MRS / Research (2008 & 2004)
'Agency of the Year' Marketing magazine (2007, 2005 & 2004)
'Marketing Company of the Year' Drum Awards (2009 & 2008)

 

London – Leeds – New York

 

London - Leeds - New York

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: 22 December 2009 14:01
To: [hidden email]
Subject: Re: Joining two files

 

Do you have many occasions when you do not redo an analysis?

Art

Bruce Weaver wrote:

Dean Tindall wrote:
  
If you have a unique variable common to both data sets, then I find it
easier to do a vlookup in excel, match up the files, and then reopen the
data in spss
 
    
 
You find that easier than:
 
match files
 file='people' /
 table='postcodes' /
 by postcode.
exe.
 
Really?  Even if you do, it sounds like you're introducing manual
procedures, which are a nuisance if you have to redo the analysis (e.g.,
after fixing data entry errors).
 
 
 
-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
 
NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://old.nabble.com/Joining-two-files-tp26874151p26888730.html
Sent from the SPSSX Discussion mailing list archive at Nabble.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
 
  

===================== 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

This email was sent from:- Nunwood Consulting Ltd. (registered in England and Wales no. 3135953) whose head office is based at:- 7, Airport West, Lancaster Way, Yeadon, Leeds, LS19 7ZA. Tel +44 (0) 845 372 0101 Fax +44 (0) 845 372 0102 Web http://www.nunwood.com Email [hidden email] This e-mail is confidential and intended solely for the use of the individual(s) to whom it is addressed. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, copying of, or any action taken in reliance upon it, is strictly prohibited and may be illegal. To review our privacy policy please visit: www.nunwood.com/privacypolicy.html
Reply | Threaded
Open this post in threaded view
|

Re: Joining two files - lookup

Jon K Peck
In reply to this post by Bruce Weaver

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Bruce Weaver <[hidden email]>
To: [hidden email]
Date: 12/22/2009 06:59 AM
Subject: Re: [SPSSX-L] Joining two files
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Dean Tindall wrote:
>
> If you have a unique variable common to both data sets, then I find it
> easier to do a vlookup in excel, match up the files, and then reopen the
> data in spss
>

You find that easier than:

match files
file='people' /
table='postcodes' /
by postcode.
exe.

Really?  Even if you do, it sounds like you're introducing manual
procedures, which are a nuisance if you have to redo the analysis (e.g.,
after fixing data entry errors).

>>>Not to mention, especially to Python fans such as Bruce :-), that there is a lookup function (actually a class) available in the extendedTransforms module on SPSS Developer Central.

Regards,
Jon Peck




Reply | Threaded
Open this post in threaded view
|

Re: Python (was: Joining two files - lookup)

Bruce Weaver
Administrator
Jon K Peck wrote
>>>Not to mention, especially to Python fans such as Bruce :-), that there
is a lookup function (actually a class) available in the
extendedTransforms module on SPSS Developer Central.

Regards,
Jon Peck

You know me too well, Jon.  ;-)

To give some background for others, Jon and I have had some off-line discussions about Python.  I don't have anything against Python per se.  In fact, from what I've seen, it looks MUCH better than Sax Basic (which was a bit of an abomination, IMO).  But I do think that people who post to this list and to the usenet newsgroup are not terribly representative of the general population of SPSS users.  I believe that the vast majority of SPSS users are point-and-clickers who *might* use a pre-packaged macro or script very occasionally, but would never write one.  I also think that most such users will never install Python (regardless of how easy it might be to do so in the eyes of Python users).  If SPSS wants that general population of users to have access to Python-based tools, Python will have to be installed automatically along with SPSS, as was (or is?) the case with Sax Basic.  

This is just my opinion, of course, and I have been wrong before.  ;-)

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Joining two files

John F Hall
In reply to this post by Muir Houston-2

This announcement from Martin Donnelly may be relevant to the ethical aspects of the thread.


(Apologies for cross-posting)

The Digital Curation Centre (DCC) and Research Information Network (RIN) are pleased to announce the rescheduled fourth meeting of the Research Data Management Forum. This event will have the theme "Dealing with Sensitive Data: managing ethics, security and trust", and will be held on 10th-11th March 2010, at Chancellors Hotel and Conference Centre, Manchester.

Speakers include:

- Nicky Tarry, Research Data Transfer Security, Department for Work and Pensions
- Kevin Ashley, Head of Digital Archives Development, University of London Computer Centre
- Melanie Wright, UK Data Archive Secure Data Service
- Veerle Van den Eynden, Research Data Management Support Services, UK Data Archive

Registration for this event is now open, via http://www.dcc.ac.uk/events/data-forum-2010-march/

Please note that delegate places are limited, so early booking is advised.

Martin Donnelly
Digital Curation Centre
University of Edinburgh

Email: [hidden email]
Tel: +44 (0)7853 261 952

http://www.dcc.ac.uk



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
----- Original Message -----
Sent: Tuesday, December 22, 2009 12:52 PM
Subject: Re: Joining two files

It sounds like the poster is trying to map some form of geodemographic classification system to the data - something perhaps like Mosaic or ACORN (both commercial but I think UK academics are allowed access and use) or, the publicly available deprivation and local neighbourhood stats - the system used here in Scotland is different from that in the rest of the UK I think (not sure about Wales)
 
in fact HESA use a system called POLAR to classify low participation neighbourhoods for performance indicators on WP and access.
 
cheers
Muir
 

Dr Muir Houston
Lecturer
DACE
Faculty of Education
University of Glasgow
0141-330-4699

 
 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John McConnell
Sent: 22 December 2009 08:24
To: [hidden email]
Subject: Re: Joining two files

As an aside to this there has also been a campaign here in the UK to make the link between postcodes and actual locations available. Up until now companies who have access to that data have been charging for it.

 

It looks like that is about to end…

 

http://news.bbc.co.uk/1/hi/technology/8402327.stm

 

Of course the personal Data Protection rules John refers to still apply

 

Regards

 

John

John McConnell

analytical people
500 Chiswick High Road
London
W4 5RG, United Kingdom

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: 22 December 2009 06:15
To: [hidden email]
Subject: Re: Joining two files

 

Short UK postcodes (eg my old address in London was N22) are the nearest equivalent of US zipcodes.  Full UK postcodes (eg N22 5HJ) refer to groups of around 12 addresses and could permit identification of respondents, hence the query.  Judging from the email address Kuaima seems to be based in the National Health Service, so will be covered by the Data Protection Act which is designed to protect personal information from unauthorised access or accidental disclosure.

 

Codes of Conduct of the British Sociological Association, the Market Research Society and the Social Research Association require identities of respondents to be kept separate from their personal data from eg questionnaires. 

 

Similar constraints apply to small electoral districts, which is why many data sets, including the Census, have such data stripped off or aggregated in order to prevent accidental or unauthorised identification of respondents.

 

For the same reason, names, addresses and phone numbers should NEVER appear on questionnaires, but be kept on a separate list (preferably by a separate research section) together with serial numbers, to be used only for essential follow-up, and destroyed on completion of the research.

----- Original Message -----

Sent: Monday, December 21, 2009 10:56 PM

Subject: Re: Joining two files

 

Just curious.  I had the impression that UK postcodes were very similar to US zipcodes.   From your message it seems they are something else.
What are UK postcodes and why would the be covered under a Data Protection Act?

Art Kendall
Social Research Consultants

John F Hall wrote:

Hope you're covered by the Data Protection Act, otherwise what are you doing with access to postcodes?

----- Original Message -----

Sent: Monday, December 21, 2009 2:43 PM

Subject: Joining two files

 

I have a data set which contains people’s details, including postcodes and another dataset which contains postcodes and characteristics of that postcode.  The first dataset may have two more than one occurrence of the same postcode.  I want to apply the postcode characteristics from the second file to the corresponding records in the first file.  Is this possible and if so how?

Thanks,

Kuiama Thompson


DISCLAIMER:
This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed.

===================== 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