Download presentation
Presentation is loading. Please wait.
Published byHorace Bruce Modified over 9 years ago
1
Samuel Clark Department of Sociology, University of Washington Institute of Behavioral Science, University of Colorado at Boulder Agincourt Health and Population Unit, University of the Witwatersrand Person Years and Crude Rates
2
Overview Lexis diagram Diagramming person years Logic of overlapping intervals Person Years calculation in Excel Person Years calculation in Stata Crude rates of World Regions 1
3
2 Lexis Diagram
4
3 Periods in a Lexis Diagram
5
4 Age Groups in a Lexis Diagram
6
5 Period-Age Categories
7
6 Strategy for Person Years Calculation Need person-years by time period and age – Do a separate calculation for males and females 1.Divide people’s life lines into sub-segments that run through each time period Overlap the life lines with the time periods, calculate the dates on which each sub-segment begins and stops 2.Divide the sub-segments running through each time period into further sub-segments that run through each age interval Calculate the age interval sub-segments by calculating the dates of all of each individual’s birthdays
8
7 Strategy for Person Years Calculation 2.Continued … Overlap the time period sub-segments with the age interval sub-segments to calculate the dates when the period-age sub-segments begin and end Subtract the begin date from the end date for each of these period-age sub-segments to generate the duration exposed in each period-age sub-segment Sum over the resulting durations within each period-age category
9
8 Diagram of Person Years
10
9 Overlapping Intervals Logic Assume there is a continuous time line: – Time point is an instant of time fixed on the time line … Defined by a single position marker (a number) – Interval is a duration of time fixed on the time line … Defined by a single time point at the begin or end and a duration OR two single time points corresponding to the begin and end – Intervals include the begin time point but not the end I x [B x,E x ) Intervals I 1 [B 1,E 1 ) and I 2 [B 2,E 2 ) overlap if: E 1 > B 2 AND B 1 < E 2
11
10 Overlapping Intervals Diagram
12
11 Overlapping Intervals in Excel Excel “code” to calculate interval overlap: AND(E1>B2,B1 T or F Excel “code” to determine if there is an overlap and define the new begin and end of the overlapping interval: if(logical test, true action, false action) BEGIN: IF(AND(E1>B2,B1<E2),MAX(B1,B2),””) END: IF(AND(E1>B2,B1<E2),MIN(E1,E2),””)
13
12 Example Data Individual-level Excel example
14
13 Excel Results
15
14 Calculate Person Years in STATA Stata example
16
15 Compare Stata does note have a calendar and cannot take into account leap years Stata makes different assumptions about open-closed intervals
17
16 Crude Rates of World Regions Look at UN spreadsheet
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.