Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Data structure for a discrete-time event history analysis Jane E. Miller, PhD.

Similar presentations


Presentation on theme: "The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Data structure for a discrete-time event history analysis Jane E. Miller, PhD."— Presentation transcript:

1 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Data structure for a discrete-time event history analysis Jane E. Miller, PhD

2 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Overview Structure of most survey data: One record per respondent Discrete-time event history analysis requires separate records for each person-time unit at risk of the event Review: How to create one record per spell How to create one record per person-time unit – Components of the dependent variable – Fixed characteristics – Time varying characteristics The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition.

3 Event history analysis: discrete time data Data preparation for an event history Survey data often contains one record per respondent Continuous-time event history data contain one record per spell Discrete-time event history analysis requires one record per person-time unit within each spell – E.g., one record for each person-month at risk of divorce, within each spell at risk of divorce

4 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Source data from survey: 1 record per respondent ID Date of birth Date of 1st marriage Date of 1st divorce Date of 2nd marriage Date of 2nd divorce Date of death Date 1st observed Date last observedGender Date of 1st child's birth Date of 2nd child's birth 12/1/52.....7/15/8510/1/10F.. 27/15/696/22/10....9/21/8511/5/10M.. 33/1/658/1/901/1/9710/1/04..10/8/855/1/05M12/5/95. 43/1/426/1/63...10/1/0212/2/8510/2/02F9/21/645/11/67

5 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Example timelines for study of divorce End of observation period L M = Married D = Divorced L = Lost to follow-up O = Censored by end of study. X = Died D M M M O X M Case 1: Never married -> no spells Case 2: Married once, censored by end of survey Case 3: Married twice, lost to follow-up before end of survey Case 4: Married once, died before end of survey Not married -> not at risk of divorce -> not part of a spell

6 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Continuous-time event history data One record for each period at risk (spell) – Duration of overall spell – Event indicator at end of spell ID Spell # (marriage #) Date spell started Duration of spell (mos.) Status at end of spell Divorce event indicator Age first observed (yrs) Age at start of spell (yrs) Age last observed (yrs)Gender # kids at start of spell 216/22/103.500164041male0 318/1/9076.511202545male0 3210/1/046.520203945male1 416/1/63474.530432160female0

7 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Event history timeline: Discrete time specification Case 2, Continuous time version: One four-month spell Married 6/22/2010Last surveyed 11/5/2010 1 st person-month Four person-month units Case 2, Discrete-time version: Each person-month unit becomes one record -> unit of analysis. All records for each spell include respondent ID and other characteristics. Married O 2 nd person-month OO 3 rd person-month OO 4 th person-month O End of survey O = Censored

8 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data One record per person-month ID Spell # (marriage #) Record # w/in spell 211 212 213 214 311 312 313 31… 3177 321 322 32… 327 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720 Discrete-time data set: ID codes on person-time records Each person-month record carries the respondent ID Each record within a given spell also includes the spell # for that respondent

9 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Record number within spell Each month in a spell will generate one person-month record, e.g., – respondent #2 is observed for 4 months -> 4 person-month records – respondent #3 contributes a total of 84 records 77 in his first spell 7 in his second spell One record per person-month ID Spell # (marriage #) Record # w/in spell 211 212 213 214 311 312 313 31… 3177 321 322 32… 327 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720

10 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Month counter within spell One record per person-month ID Spell # (marriage #) Record # w/in spell month # within spell 2110 2121 2132 2143 3110 3121 3133 31…… 317776 3211 3222 32…… 3276 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720 The “month # within spell” counter indicates the start time of the person-month at risk for that record. E.g., the first record for a given spell starts at baseline (time point 0).

11 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Duration measure for each record within spell The duration measure will = 1 time units for all person-time records within a given spell EXCEPT = 0.5 for the last month in a spell One record per person-month ID Spell # (marriage #) Record # w/in spell month # within spell Person- months w/in record 21101 21211 21321 2143.5 31101 31211 31331 31……1 317776.5 32111 32221 32……1 3276 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720

12 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Status indicator for each record within spell The indicator for status at end of record will = 0 for all person-time records within a given spell EXCEPT the last one because by definition they end in censoring (the spell is not yet complete) One record per person-month ID Spell # (marriage #) Record # w/in spell month # within spell Person- months w/in record Status at end of record 211010 212110 213210 2143.50 311010 312110 313310 31……10 317776.51 321110 322210 32……10 3276 2 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720

13 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Status indicator for last record within spell The indicator for status at end of record for the last person- time record within each spell will take on the value of the status indicator for the overall spell One record per person-month ID Spell # (marriage #) Record # w/in spell month # within spell Person- months w/in record Status at end of record 211010 212110 213210 2143.50 311010 312110 313310 31……10 317776.51 321110 322210 32……10 3276 2 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720

14 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Event indicator for each record within spell One record per person-month ID Spell # (marriage #) Record # w/in spell month # within spell Divorce indicator for record 21100 21210 21320 21430 31100 31210 31330 31……0 3177761 32110 32220 32……0 32760 One record per spell ID Spell # (marriage #) Duration of spell (mos.) Status at end of spell Divorce indicator 21400 317711 32720

15 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Fixed covariates for each person-time record ID Spell # (marriage #) Record # w/in spell month # within spell Divorce indicator for record Age at start of spell (yrs)Gender # children at start of spell 2110040male0 2121040male0 2132040male0 2143040male0 3110025male0 3121025male0 3133025male0 31……025male0 317776125male0 3211039male1 3222039male1 32……039male1 3276039male1 Age, number of children at start of spell, and gender do not change during the course of a spell, so they have the same value for each person-time record within a given spell

16 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Example timelines for number of children as time-varying covariate in study of divorce L M = Married D = Divorced C = Child born L = Lost to follow-up O = Censored by end of study. X = Died D M M X M Case 3: Case 4: C CC No kids One kid Two kids One kid ID Date of birth Date 1st observed Date of 1st marriage Date of 1st child's birth Date of 2nd child's birth Date of 1st divorce Date of 2nd marriage Date of 2nd divorce Date of death Date last observed 33/1/6510/8/858/1/9012/5/95.1/1/9710/1/04..5/1/05 43/1/4212/2/856/1/639/21/645/11/67...10/1/0210/2/02 Columns reordered into chronological order

17 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Discrete time with time-varying covariates Case 3 has his first child 64 months into his first marriage, and no additional children while observed. # kids at start of record is  0 for his first 63 records of spell 1  1 for records 64 through 77 of spell 1  1 for all records in spell 2 IDSpell # month # w/in spell Divorce indicator for record # kids at start of spell # kids at start of record 310000 311000 31…000 3164001 3177101 320011 32…011 326011

18 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Discrete time with time-varying covariates Case 4 has her first child 15 months into her marriage, a second child in month 47 after marriage. For her the # kids at start of record is  0 for her first 15 records  1 for records 15 through 46  2 for records 47 or higher, all in spell 1 IDSpell # month # w/in spell Divorce indicator for record # kids at start of spell # kids at start of record 410000 41…000 4115001 41…001 4147002 41… 002 41474002

19 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Presenting information on event history construction: Background work Most of the gory details of creating an event history are part of behind-the-scenes work – Important to do consistency checks to make sure event histories were created correctly given Original data source of information for timeline construction Type of event under study Fixed covariates Time-varying covariates – E.g., correct Number of spells per respondent Number of person-time records for each spell Duration and event indicators for each person-time record Values of fixed- and time-varying covariates for each person-time record

20 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Presenting information on event history construction In the data and methods section, describe: – Original data source of information for timeline construction Dates, status, duration of events – Type of event under study – Unit of person-time (e.g., person-years, person-months) – What constitutes censoring – Fixed covariates – Time-varying covariates Source(s) of information for determining timing of changes in those variables See checklist in chapter 17 of Writing about Multivariate Analysis, 2nd Edition for more detail on what to report

21 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Summary A discrete-time event history analysis requires a separate record for each person-time unit at risk of the event For each respondent, create correct number of spells For each spell, calculate – Correct number of person-time units – Components of the dependent variable Duration measure Event indicator – Fixed characteristics – Time-varying characteristics In data and methods section, describe data sources and variables for the event history The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition.

22 Event history analysis: discrete time data Suggested resources Allison, P. D. 2010. Survival Analysis Using the SAS System: A Practical Guide, 2nd Edition. Cary, NC: SAS Institute. Miller, J. E. 2013. The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. University of Chicago Press, chapter 17. The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition.

23 Event history analysis: discrete time data Suggested online resources Podcast on data structure for a continuous- time event history analysis

24 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Suggested exercises Study guide to The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. – Question #3a in the problem set for chapter 17 – Suggested course extensions for chapter 17 “Reviewing” exercises #2a through 2h “Applying statistics and writing” exercises #1 and 2a

25 The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Event history analysis: discrete time data Contact information Jane E. Miller, PhD jmiller@ifh.rutgers.edu Online materials available at http://press.uchicago.edu/books/miller/multivariate/index.html The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition.


Download ppt "The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Data structure for a discrete-time event history analysis Jane E. Miller, PhD."

Similar presentations


Ads by Google