{"id":1675,"date":"2011-10-21T21:41:13","date_gmt":"2011-10-22T02:41:13","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=1675"},"modified":"2011-10-21T21:47:23","modified_gmt":"2011-10-22T02:47:23","slug":"survivor-functions-hazard-functions-and-pictures","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/survivor-functions-hazard-functions-and-pictures\/","title":{"rendered":"Survivor Functions, Hazard Functions and Pictures"},"content":{"rendered":"<p>Unfamiliar jargon like Kaplan-Meier curves, PROC PHREG, right-censored and hazard functions can be daunting to the newcomer. Survival analysis is really quite straightforward; it is simply a set of statistical techniques used when the focus is \u201ctime to event\u201d. The event can be death, divorce, arrest, substance abuse or literally anything else. You\u2019ve been wanting survival analysis if you have ever asked any of these questions:<\/p>\n<ul>\n<li> \u201cHow long can the average person with X be expected to survive before the event occurs?\u201d<\/li>\n<li> \u201cGiven that a person has made it up to this point, how much longer can she be expected to survive?\u201d<\/li>\n<li> \u201cAre chances of survival higher for people in group A or group B?\u201d<\/li>\n<\/ul>\n<p>So, I was thinking today, why not just show pictures to calm people down and begin introducing concepts in survival analysis. Everybody likes pictures, right?<\/p>\n<p>Let&#8217;s imagine a picture of a survivor function. It looks like this. In the beginning we are all alive and in the long-run we are all dead.<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1740\" title=\"SurvivalPlot\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot1-300x225.png\" alt=\"Survival plot\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot1-300x225.png 300w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot1.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>To get this curve, I used the following SAS code<\/p>\n<p><code>ods graphics on ;<br \/>\nLIBNAME in \"C:\\Users\\AnnMaria\\Documents\\survive\" ;<br \/>\nPROC LIFETEST DATA = in.addicts METHOD = KM PLOTS = ALL ;<br \/>\nTIME survt*status(0) ;<br \/>\nWHERE clinic = 1;<\/code><\/p>\n<p>Now let&#8217;s compare some survival curves from actual data. These are from the addicts data set in David Kleinbaum&#8217;s book on survival analysis. Here we have two clinics and we want to know whether one clinic has a higher probability of patients surviving the treatment than the other. In this case survival means not dropping out of the treatment.<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1729\" title=\"SurvivalPlot\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot-300x225.png 300w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/10\/SurvivalPlot.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>If you look at the curves above, you&#8217;ll see that Clinic 2 clearly had a better survival rate than did Clinic 1. That&#8217;s nice and all but what about the possibility that Clinic 1 had &#8220;tougher customers&#8221; ? Is Clinic 2 still superior when controlling for possible pre-existing differences?<\/p>\n<p>That, my dears, is an adjusted survival curve, which is\u00a0 a picture for another day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unfamiliar jargon like Kaplan-Meier curves, PROC PHREG, right-censored and hazard functions can be daunting to the newcomer. Survival analysis is really quite straightforward; it is simply a set of statistical techniques used when the focus is \u201ctime to event\u201d. The event can be death, divorce, arrest, substance abuse or literally anything else. You\u2019ve been wanting&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1675","post","type-post","status-publish","format-standard","hentry","category-statistics"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=1675"}],"version-history":[{"count":8,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions"}],"predecessor-version":[{"id":1742,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions\/1742"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=1675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=1675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=1675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}