I have access to some registers in Sweden with which I plan to make health studies on people living in the Stockholm County. For every study I would like to extract people who have lived long enough in Stockholm to have time to go to the health care system and get a diagnosis, one or two years maybe. I´m trying to create a flexible syntax that can answer a question like: During the period 1998-2010 how many days did these persons live in the Stockholm county?
The variables I have are: Registered in Stockholm County 1980 (Yes/No) Registered in Stockholm County 1981 (Yes/No) etc until the year 2011 I also have four types of dates. 1. Dates of emigration from Sweden (As many dates as the person has emigrated, 1-n) 2. Dates of immigration to Sweden (As many dates as the person has immigrated, 1-n) 3. Dates of moving from Stockholm to another county (As many dates as the person has left Stockholm, 1-n) 4. Dates of moving to Stockholm from another county (As many dates as the person has moved to Stockholm, 1-n) I also have variable that has information if a person is born in Sweden or not, but not if the person is born in Stockholm county or not. Most people will have no migration or moving dates so they are easy but others might emigrate from Stockholm, then immigrate to another county in Sweden and then move back to Stockholm again. If anyone could tell me how to start when writing this I would be grateful. |
Henrik,
You describe two kinds data: registration data and emigration and immigration (exact) date data. So the registration data could look like this: Id registration1980 ... registration2011 27 0=No, 1=yes -------------------------> Would it satisfy your needs if you could determine which people were registered for two consecutive years. I'm assuming that one year of registration is inadequate but is that true? Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Henrik Dal Sent: Thursday, December 06, 2012 11:21 AM To: [hidden email] Subject: Calculating time in a study with four types of migration dates I have access to some registers in Sweden with which I plan to make health studies on people living in the Stockholm County. For every study I would like to extract people who have lived long enough in Stockholm to have time to go to the health care system and get a diagnosis, one or two years maybe. I´m trying to create a flexible syntax that can answer a question like: During the period 1998-2010 how many days did these persons live in the Stockholm county? The variables I have are: Registered in Stockholm County 1980 (Yes/No) Registered in Stockholm County 1981 (Yes/No) etc until the year 2011 I also have four types of dates. 1. Dates of emigration from Sweden (As many dates as the person has emigrated, 1-n) 2. Dates of immigration to Sweden (As many dates as the person has immigrated, 1-n) 3. Dates of moving from Stockholm to another county (As many dates as the person has left Stockholm, 1-n) 4. Dates of moving to Stockholm from another county (As many dates as the person has moved to Stockholm, 1-n) I also have variable that has information if a person is born in Sweden or not, but not if the person is born in Stockholm county or not. Most people will have no migration or moving dates so they are easy but others might emigrate from Stockholm, then immigrate to another county in Sweden and then move back to Stockholm again. If anyone could tell me how to start when writing this I would be grateful. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Calculating-time-in-a-study-with-four-types-of-migration-dates-tp5716724.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 |
In reply to this post by Henrik Dal
From: Henrik Dal [mailto:[hidden email]] Hello Gene. If a person moves into Stockholm in february 1 1997 and out of Stockholm in may 1 1999 I would like to be able to use the migration/moving dates to calculate his stay in Stockholm to 2 years and 3 months. If I do not manage in making a syntax for this, I will use the registration years as you suggest. That would give 2 years in this example since a person is registered in december 31 each year (I think). Best wishes Henrik Dal
|
In reply to this post by Henrik Dal
Henrik,
Please post some sample data. We need to see whether the data are organized as wide or long. Also, what is the maximum value of 'n', the number of dates? Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Henrik Dal Sent: Thursday, December 06, 2012 11:21 AM To: [hidden email] Subject: Calculating time in a study with four types of migration dates I have access to some registers in Sweden with which I plan to make health studies on people living in the Stockholm County. For every study I would like to extract people who have lived long enough in Stockholm to have time to go to the health care system and get a diagnosis, one or two years maybe. I´m trying to create a flexible syntax that can answer a question like: During the period 1998-2010 how many days did these persons live in the Stockholm county? The variables I have are: Registered in Stockholm County 1980 (Yes/No) Registered in Stockholm County 1981 (Yes/No) etc until the year 2011 I also have four types of dates. 1. Dates of emigration from Sweden (As many dates as the person has emigrated, 1-n) 2. Dates of immigration to Sweden (As many dates as the person has immigrated, 1-n) 3. Dates of moving from Stockholm to another county (As many dates as the person has left Stockholm, 1-n) 4. Dates of moving to Stockholm from another county (As many dates as the person has moved to Stockholm, 1-n) I also have variable that has information if a person is born in Sweden or not, but not if the person is born in Stockholm county or not. Most people will have no migration or moving dates so they are easy but others might emigrate from Stockholm, then immigrate to another county in Sweden and then move back to Stockholm again. If anyone could tell me how to start when writing this I would be grateful. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Calculating-time-in-a-study-with-four-types-of-migration-dates-tp5716724.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 |
In reply to this post by Henrik Dal
Last week, Henrik posted a question about working with date-locations data to identify time-in-residence at a specific location. He forwarded some example data to me and I’m reposting it so that others can see it and work with it. Gene Maguin From: Henrik Dal [mailto:[hidden email]] Hello Gene. Here are some examples of moving patterns for three individuals. All 4 original files are in a wide format. The number of moves or migrations could be up to say 50. Individuals 1,2,3. File 1 with county of registration (Dec 31 each year). IDNR StockholmCounty1980 StockholmCounty1981 StockholmCounty1982 StockholmCounty1983 StockholmCounty1984 etc 1 No Yes No Yes No 2 Yes Yes Yes Yes Yes 3 No Yes No No Yes File 2 with moves from one county to another IDNR Date From To 1 Feb 2 1981 Uppsala county Stockholm county 1 Mar 8 1981 Stockholm county Uppsala county 1 Oct 3 1981 Uppsala county Stockholm county 1 May 9 1982 Stockholm county Skane county 1 June 7 1983 Skane county Stockholm county 3 Sep 6 1982 Stockholm county Narke county File 3 with emigration out of Sweden or immigration into Sweden IDNR Date Type of migration 1 May 3 1984 Emigration 3 Aug 4 1981 Immigration 3 Dec 1 1982 Emigration 3 June 5 1983 Immigration File 4 with date of birth and country of birth. IDNR Date of birth Country of birth 1 Sep 3 1970 Sweden 2 May 7 1963 Sweden 3 Jan 8 1972 Not Sweden I hope this clarifies the problem Sincerely Henrik Dal
|
Free forum by Nabble | Edit this page |