{"id":3760,"date":"2013-12-01T22:55:01","date_gmt":"2013-12-02T03:55:01","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=3760"},"modified":"2013-12-01T22:55:01","modified_gmt":"2013-12-02T03:55:01","slug":"quantifying-disease-with-sas-who-knew","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/quantifying-disease-with-sas-who-knew\/","title":{"rendered":"Quantifying Disease with SAS &#8211; who knew?"},"content":{"rendered":"<p>This month, I&#8217;m teaching biostatistics for National University, and so far I am really enjoying it. There is just a really minor problem, though. While I received a copy of the textbook, I did not receive a copy of the instructor&#8217;s manual with answers to the homework problems. Since I am going to grade 20 people based on whatever I get, I need to be 100% correct in everything and it is taking up my time to computer Cumulative Incidence for the population, cumulative incidence for people with hypertension, population attributable risk &#8211;\u00a0 and I am busy.<\/p>\n<p>So, check this out, and all of you epidemiologists, I am sure this is old hat to you &#8230;. I had a table that gave me the number of people who were and were not hypertensive and whether or not they had a stroke in the five years they were followed. I wanted cumulative incidence for those with hypertension, those without and the population attributable risk.<\/p>\n<p>And here we go &#8230;..<\/p>\n<p>DATA stroke ;<br \/>\nINPUT\u00a0 Event_E Count_E Event_NE Count_NE;<br \/>\nDATALINES ;<br \/>\n18\u00a0 252\u00a0 46\u00a0 998<br \/>\n;<\/p>\n<p>proc stdrate data=stroke<br \/>\nrefdata=stroke<br \/>\nmethod=indirect(af)<br \/>\nstat=risk<br \/>\n;<br \/>\npopulation event=Event_E\u00a0 total=Count_E;<br \/>\nreference\u00a0 event=Event_NE total=Count_NE;<br \/>\nrun;<\/p>\n<p>&nbsp;<\/p>\n<p>All I need to do is create a data set where I give the number of people who were exposed, (in this case, who had hypertension) who had the event,\u00a0 a stroke, in my example, and the total number of exposed people. Then, the number not exposed (that is, not hypertensive) who had the event, and the total number not exposed.<\/p>\n<p>I just invoke the PROC STDRATE giving it the name of my dataset and specifying that I wanted risk as the statistics.<\/p>\n<p>In my POPULATION statement, I specify that for the population of interest, people with hypertension, the number who had the event was found in the variable Event_E and the total number was in Count_E .<\/p>\n<p>In my REFERENCE statement, I give the number who had the event and the total number for people who were not exposed to the risk factor.<\/p>\n<p>That&#8217;s it.<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2013\/12\/par.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3761\" alt=\"output showing cumulative incidence and risk\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2013\/12\/par-300x107.png\" width=\"300\" height=\"107\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2013\/12\/par-300x107.png 300w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2013\/12\/par.png 713w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This month, I&#8217;m teaching biostatistics for National University, and so far I am really enjoying it. There is just a really minor problem, though. While I received a copy of the textbook, I did not receive a copy of the instructor&#8217;s manual with answers to the homework problems. Since I am going to grade 20&#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":[9,11,8],"tags":[],"class_list":["post-3760","post","type-post","status-publish","format-standard","hentry","category-software","category-statistics","category-technology"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/3760","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=3760"}],"version-history":[{"count":1,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/3760\/revisions"}],"predecessor-version":[{"id":3762,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/3760\/revisions\/3762"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=3760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=3760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=3760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}