{"id":18818,"date":"2021-12-15T09:05:22","date_gmt":"2021-12-15T07:05:22","guid":{"rendered":"https:\/\/www.wjst.de\/blog\/?p=18818"},"modified":"2021-12-19T15:18:23","modified_gmt":"2021-12-19T13:18:23","slug":"epidemiological-modelling-at-the-next-level","status":"publish","type":"post","link":"https:\/\/www.wjst.de\/blog\/sciencesurf\/2021\/12\/epidemiological-modelling-at-the-next-level\/","title":{"rendered":"Epidemiological modelling at the next level"},"content":{"rendered":"<p>I have done epidemiological modeling for a long time\u00a0 in SAS and R.\u00a0 cleaning the data and building an appropriate statistical model. In practice there were basically two choices either logistic or linear regression, maybe in subgroups and defined intervals, with more or less variables depending on experience or preference ( occasionally also\u00a0 a Loess smoother for a clearer picture). Maybe I learned about R^2 and AIC while writing <a href=\"https:\/\/www.atsjournals.org\/doi\/full\/10.1164\/ajrccm.156.6.9611068\">this paper<\/a>. Yes, I always looked at residuals but my capability in judging model capability was limited both from theoretical and practical aspects.<\/p>\n<p>When working now on an image analysis project to Python, I found it stunning what the library <a href=\"https:\/\/towardsdatascience.com\/introduction-to-regression-in-python-with-pycaret-d6150b540fc4\">PyCare<\/a>t can do.<\/p>\n<blockquote><p>One line of code and we have trained and evaluated over 20 models using cross-validation. The scoring grid printed above highlights the highest performing metric for comparison purposes only. The grid by default is sorted using\u00a0<code class=\"lq lr ls lt lm b\">R2<\/code>\u00a0(highest to lowest) which can be changed by passing\u00a0<code class=\"lq lr ls lt lm b\">sort<\/code>\u00a0parameter. For example,\u00a0<code class=\"lq lr ls lt lm b\">compare_models(sort = 'RMSLE')<\/code>\u00a0will sort the grid by RMSLE (lower to higher since lower is better).<\/p><\/blockquote>\n<p>I am now thinking to repeat some earlier analysis &#8212; just to see if I really did the best choice when writing my <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pmc\/articles\/PMC1240049\/\">latitude paper<\/a> back in 2005. It was one of the largest studies at that time.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nconda create --name regression python=3.7.11\r\nconda activate regression\r\npip install pycaret pyreadr\r\nconda deactivate\r\n<\/pre>\n<p>TBC<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"bottom-note\">\n  <span class=\"mod1\">CC-BY-NC Science Surf , accessed 24.04.2026<\/span>\n <\/div>","protected":false},"excerpt":{"rendered":"<p>I have done epidemiological modeling for a long time\u00a0 in SAS and R.\u00a0 cleaning the data and building an appropriate statistical model. In practice there were basically two choices either logistic or linear regression, maybe in subgroups and defined intervals, with more or less variables depending on experience or preference ( occasionally also\u00a0 a Loess &hellip; <a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2021\/12\/epidemiological-modelling-at-the-next-level\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Epidemiological modelling at the next level<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-18818","post","type-post","status-publish","format-standard","hentry","category-asthma-allergy"],"_links":{"self":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/18818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/comments?post=18818"}],"version-history":[{"count":5,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/18818\/revisions"}],"predecessor-version":[{"id":18836,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/18818\/revisions\/18836"}],"wp:attachment":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/media?parent=18818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/categories?post=18818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/tags?post=18818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}