Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prep-data-long-surv doesn't treat multiple events properly #41

Closed
jburos opened this issue Jan 7, 2017 · 0 comments
Closed

prep-data-long-surv doesn't treat multiple events properly #41

jburos opened this issue Jan 7, 2017 · 0 comments
Assignees

Comments

@jburos
Copy link
Member

jburos commented Jan 7, 2017

prep_data_long_surv currently works very simplistically by assuming that each subject has one and only one record.

This assumption works for most common use cases, but it breaks down when considering a semi-competing or competing risks model. In these scenarios we often have input data containing more than one event per subject.

Passing input data like the following, which has 4 events with subject_id == 7:

screen shot 2017-01-07 at 3 06 53 pm

Currently results in 4 records (duplicates by subject_id) for each failure time:

screen shot 2017-01-07 at 3 09 05 pm

Instead, we would rather keep only one of these for each subject_id * end_time combination.

This is a prereq for #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant