Finding an earlier subgroup

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

Finding an earlier subgroup

Øivind Hundal
I have two databases, both covering the complete Norwegian population, from the years 2004 and 2009. Showing people having received certain medications.
 
The people/cases all have an ID which is an encrypted version of their social security number. The years 2004 and 2009 are encrypted with the same algoritm, which means it is possible to track individuals without finding their identity.
 
If I make a subgroup/selection from the 2004-database (typically 10000-30000 cases/patients), how can I identify the same cases/patients in the 2009-file?.
 
It is of course to be expected that only some of the cases from the 2004-selection are found in the 2009-file. Because of deaths, emigrations or simply just stopping that particular therapeutic regiemen.
Reply | Threaded
Open this post in threaded view
|

Re: Finding an earlier subgroup

Albert-Jan Roskam
From: Øivind Hundal <[hidden email]>
To: [hidden email]
Sent: Tuesday, August 14, 2012 10:27 AM
Subject: [SPSSX-L] Finding an earlier subgroup
I have two databases, both covering the complete Norwegian population, from the years 2004 and 2009. Showing people having received certain medications.
 
The people/cases all have an ID which is an encrypted version of their social security number. The years 2004 and 2009 are encrypted with the same algoritm, which means it is possible to track individuals without finding their identity.
 
If I make a subgroup/selection from the 2004-database (typically 10000-30000 cases/patients), how can I identify the same cases/patients in the 2009-file?.
 
It is of course to be expected that only some of the cases from the 2004-selection are found in the 2009-file. Because of deaths, emigrations or simply just stopping that particular therapeutic regiemen.

===> SELECT x, y, z FROM tbl2004 INNER JOIN tbl2009 ON tbl2004.ssn = tbl2009.ssn;

or
 
MATCH FILES / FILE = data2004 / IN = in2004 / FILE = data2009 /IN = in2009 / BY= ssn.
SELECT IF (in2004 EQ 1 AND in2009 EQ 1).
EXECUTE.
Reply | Threaded
Open this post in threaded view
|

Re: Finding an earlier subgroup

David Marso
Administrator
I would take advantage of the 'logical' status of in2004 and in2009 and simply use (after the MATCH of course).
--
SELECT IF in2004 AND in2009.

Albert-Jan Roskam wrote
________________________________
From: Øivind Hundal <[hidden email]>
To: [hidden email] 
Sent: Tuesday, August 14, 2012 10:27 AM
Subject: [SPSSX-L] Finding an earlier subgroup

I have two databases, both covering the complete Norwegian population, from the years 2004 and 2009. Showing people having received certain medications.
>
>The people/cases all have an ID which is an encrypted version of their social security number. The years 2004 and 2009 are encrypted with the same algoritm, which means it is possible to track individuals without finding their identity.
>
>If I make a subgroup/selection from the 2004-database (typically 10000-30000 cases/patients), how can I identify the same cases/patients in the 2009-file?.
>
>It is of course to be expected that only some of the cases from the 2004-selection are found in the 2009-file. Because of deaths, emigrations or simply just stopping that particular therapeutic regiemen.
>===> SELECT x, y, z FROM tbl2004 INNER JOIN tbl2009 ON tbl2004.ssn = tbl2009.ssn;
>
>or
>
>MATCH FILES / FILE = data2004 / IN = in2004 / FILE = data2009 /IN = in2009 / BY= ssn.
>SELECT IF (in2004 EQ 1 AND in2009 EQ 1).
>EXECUTE.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"