{"id":4416,"date":"2014-10-14T05:50:41","date_gmt":"2014-10-14T04:50:41","guid":{"rendered":"http:\/\/emilkirkegaard.dk\/en\/?p=4416"},"modified":"2014-10-14T05:50:41","modified_gmt":"2014-10-14T04:50:41","slug":"cancer-rates-and-life-expectancy","status":"publish","type":"post","link":"https:\/\/emilkirkegaard.dk\/en\/2014\/10\/cancer-rates-and-life-expectancy\/","title":{"rendered":"Cancer rates and life expectancy?"},"content":{"rendered":"<p>An online acquaintance asked me me to find data about these two and look for a relationship. It stands to reason that if you have a country where people die of lots of other things (accidents, warfare, parasites\/contagious disease, hunger\/thirst), they don&#8217;t ling long enough to get cancer.<\/p>\n<p>I already had life expectancy data from the UN when I imported the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Human_Development_Index\">Human Development Index<\/a> data. So where to find cancer rate data? <a href=\"http:\/\/www.theguardian.com\/news\/datablog\/2011\/jan\/24\/worldwide-cancer-rates-uk-rate-drops\">I found 50 datapoints here<\/a>. There are other sources such as <a href=\"http:\/\/globocan.iarc.fr\/Pages\/fact_sheets_cancer.aspx\">this<\/a>, but they have age standardized the data, which makes it useless for our purpose here. Furthermore, they are given by regions, where we want country-level.<\/p>\n<p>So, I used the 50 datapoints from The Guardian. In R, I typed:<\/p>\n<blockquote><p>source(&#8220;merger.R&#8221;) #this loads my custom functions for working with the megadataset<\/p>\n<p>DF.mega = read.mega(&#8220;Megadataset_v1.7b.csv&#8221;) #load data<\/p>\n<p>#plot<br \/>\nlibrary(car) #library needed for scatterplot function<br \/>\nscatterplot(CancerRatePer100000 ~ X2012LifeExpectancyatBirth, DF.mega,<br \/>\nsmoother=FALSE, #no moving average<br \/>\nlabels = rownames(DF.mega),id.n=nrow(DF.mega)) #add labels for all points<\/p>\n<p>#correlation<br \/>\ncor(DF.mega[&#8220;CancerRatePer100000&#8221;],DF.mega[&#8220;X2012LifeExpectancyatBirth&#8221;],use=&#8221;pairwise&#8221;) #get correlation<\/p><\/blockquote>\n<p><a href=\"http:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Cancerrate_lifeexpectancy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4417\" src=\"http:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Cancerrate_lifeexpectancy.png\" alt=\"Cancerrate_lifeexpectancy\" width=\"660\" height=\"407\" \/><\/a><\/p>\n<p>The correlation is .55. The labels are ISO-3 or custom (full names can be found in the &#8220;Names&#8221; variable in the megadataset).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An online acquaintance asked me me to find data about these two and look for a relationship. It stands to reason that if you have a country where people die of lots of other things (accidents, warfare, parasites\/contagious disease, hunger\/thirst), they don&#8217;t ling long enough to get cancer. I already had life expectancy data from [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1727],"tags":[2028,2029],"class_list":["post-4416","post","type-post","status-publish","format-standard","hentry","category-medicine","tag-cancer","tag-life-expectancy","entry"],"_links":{"self":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/4416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/comments?post=4416"}],"version-history":[{"count":1,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/4416\/revisions"}],"predecessor-version":[{"id":4418,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/4416\/revisions\/4418"}],"wp:attachment":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/media?parent=4416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/categories?post=4416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/tags?post=4416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}