Hi all, I am trying to convert a dataset to person-period format, which means each subject has one row of data per time period. First of all, I am not sure whether the current data format satisfy the requirements of being called a person-period. Below is part of what the data looks like:
I think the part that I am not so sure about is whether the remaining data should still be kept in the dataset once a subject has the event occur. For example, at age 22 the event for the first time changed from 0 to 1 for a participant and does the information for this participant after age 22 is still needed? In my current dataset, as you can see, participant's information was kept until a certain age regardless of whether they've had the event occurred. Is this an issue for person-period dataset? Also, should I drop the missing values under the EVENT variable and only keep the cases of 0 or 1? Thanks!
Code:
. list UCIn age CENSOR EVENT PERIOD in 1/40 +--------------------------------------+ | UCIn age CENSOR EVENT PERIOD | |--------------------------------------| 1. | 10 17 1 0 2 | 2. | 10 18 1 0 3 | 3. | 10 20 1 0 5 | 4. | 10 22 1 0 7 | 5. | 10 23 1 0 8 | |--------------------------------------| 6. | 15 16 1 . 1 | 7. | 15 17 1 0 2 | 8. | 15 18 1 0 3 | 9. | 15 19 1 0 4 | 10. | 15 20 1 0 5 | |--------------------------------------| 11. | 15 21 1 0 6 | 12. | 15 22 1 . 7 | 13. | 15 23 1 . 8 | 14. | 21 17 1 . 2 | 15. | 21 18 1 0 3 | |--------------------------------------| 16. | 21 19 1 0 4 | 17. | 21 20 1 0 5 | 18. | 21 21 1 0 6 | 19. | 21 22 1 0 7 | 20. | 21 23 1 0 8 | |--------------------------------------| 21. | 21 25 1 0 10 | 22. | 34 16 1 . 1 | 23. | 34 19 1 0 4 | 24. | 34 20 1 0 5 | 25. | 34 21 1 0 6 | |--------------------------------------| 26. | 34 23 1 0 8 | 27. | 34 24 1 0 9 | 28. | 36 16 0 . 1 | 29. | 36 17 0 . 2 | 30. | 36 19 0 1 4 | |--------------------------------------| 31. | 36 20 0 1 5 | 32. | 36 21 0 1 6 | 33. | 36 22 0 1 7 | 34. | 36 23 0 1 8 | 35. | 39 17 1 . 2 | |--------------------------------------| 36. | 39 18 1 0 3 | 37. | 39 19 1 0 4 | 38. | 39 22 1 . 7 | 39. | 39 23 1 . 8 | 40. | 41 17 1 . 2 | +--------------------------------------+
Comment