Statalist The Stata Listserver

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

RE: st: Changing spells to person-years

From   "Buszin, Justin" <[email protected]>
To   <[email protected]>
Subject   RE: st: Changing spells to person-years
Date   Mon, 20 Nov 2006 22:20:21 -0500

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?



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