{"action":"created","issue":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/196","labels_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/196/comments","events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/196/events","html_url":"https://github.com/CamDavidsonPilon/lifelines/pull/196","id":110096215,"number":196,"title":"adding functionality to calculate baseline hazards for each strata","user":{"login":"jstoxrocky","id":5459666,"avatar_url":"https://avatars.githubusercontent.com/u/5459666?v=3","gravatar_id":"","url":"https://api.github.com/users/jstoxrocky","html_url":"https://github.com/jstoxrocky","followers_url":"https://api.github.com/users/jstoxrocky/followers","following_url":"https://api.github.com/users/jstoxrocky/following{/other_user}","gists_url":"https://api.github.com/users/jstoxrocky/gists{/gist_id}","starred_url":"https://api.github.com/users/jstoxrocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstoxrocky/subscriptions","organizations_url":"https://api.github.com/users/jstoxrocky/orgs","repos_url":"https://api.github.com/users/jstoxrocky/repos","events_url":"https://api.github.com/users/jstoxrocky/events{/privacy}","received_events_url":"https://api.github.com/users/jstoxrocky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-06T20:39:34Z","updated_at":"2015-10-07T04:03:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/196","html_url":"https://github.com/CamDavidsonPilon/lifelines/pull/196","diff_url":"https://github.com/CamDavidsonPilon/lifelines/pull/196.diff","patch_url":"https://github.com/CamDavidsonPilon/lifelines/pull/196.patch"},"body":"My understanding is that stratification of the data is done when the requirement of proportionality between hazard functions fails. For this reason, different strata should have different estimates of the baseline_hazard function. \r\n\r\nThe code right now, although it stratifies the data and correctly calculates the values of the covariates, it does not extend to calculating unique baseline_hazard estimates for each strata. It returns a blended baseline_hazard_ based on data from all stratas.\r\n\r\nThis code attempts to solve that problem. Let me know what you think. It might be a bit messy. "},"comment":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/comments/146072406","html_url":"https://github.com/CamDavidsonPilon/lifelines/pull/196#issuecomment-146072406","issue_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/196","id":146072406,"user":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T04:03:48Z","updated_at":"2015-10-07T04:03:48Z","body":"Thanks for the PR, @jstoxrocky! I'll have a look at this over the next few days =)"}}