Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Changing spells to person-years

From   David Kantor <[email protected]>
To   [email protected]
Subject   RE: st: Changing spells to person-years
Date   Tue, 21 Nov 2006 09:41:34 -0500

When you say "row", is this a line of raw data, or an observation in a Stata dataset? (Have you already loaded it into Stata? If so, what are the variables and types?)

Where you write, "Next Variable (same row)", it is not clear how you determine where one "variable" ends and another begins. And it is not clear what you mean by "missing from 4th start date to 10th end date" and "missing from 8th start date through 10th end date". (Which attributes?)

If this is raw data, please show enough of a sample so we can see two or more attributes of one person. Let us know where the line-breaks are, since our mail programs may insert additional line-breaks. Include a person-identifier (which I presume exists). You can use substitute values for person-identifier if necessary, to conceal identities.

And please do not include attachments.


At 10:20 PM 11/20/2006, you wrote:

David and listservers,

Thank you for your help. Here are better specifics of the data:

rural 0 3 urban 4 6 rural 7 15 urban 16 20 rural 21 24 urban 25 26 rural 27 27

This represents one person and their history of living in rural or urban areas (first number is start age, second number is end age). Below I outline how this person looks and variables before what I list above:

Person 1, Lives in Central from age 0-10, lives in Greater Accra from 11-20, lives in Ashanti from 21-27, missing from 4th start date to 10th end date (this person has lived in three regions her whole life). "Next Variable (same row)", lives in rural area from 0-3, urban area from 4-6, rural area from 7-15, urban area from 16-20, rural area from 21-24, urban area from 25-26, rural area from 27 to 27 (person is 27 years old), missing from 8th start date through 10th end date.

I hope this makes things clearer. How can this spell file be changed into a person-year long file without creating hundreds of new variables to represent a spell?


*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index