{"id":768,"date":"2019-08-14T08:00:00","date_gmt":"2019-08-14T12:00:00","guid":{"rendered":"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/?p=768"},"modified":"2019-08-13T15:23:20","modified_gmt":"2019-08-13T19:23:20","slug":"what-is-multiple-regression-doing","status":"publish","type":"post","link":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/08\/14\/what-is-multiple-regression-doing\/","title":{"rendered":"What is multiple regression doing?"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">Not long after making my <a href=\"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/08\/12\/collecting-my-thoughts-about-variable-selection-in-multiple-regression\/\">initial post<\/a> in this series on variable selection in multiple regression, I received the following question on Twitter:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-13-at-1.47.15-PM.png\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">The short answer is that <code>lm()<\/code> isn\u2019t doing anything special with the covariates. It\u2019s simply minimizing the squared deviation between predictions and observations. The longer version is that it\u2019s able to \u201crecognize\u201d the \u201creal\u201d relationships in the example because it\u2019s doing something analogous to a controlled experiment. It is (statistically) holding other covariates constant and asking what the effect of varying just one of them is. The trick is that it\u2019s doing this for all of the covariates simultaneously.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">I illustrate this in a new R notebook by imagining a regression analysis in which we look for an association between, say, <code>x9<\/code> and the residuals left after regressing <code>y<\/code> on <code>x1<\/code>.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/variable-selection\/what-is-multiple-regression-doing.nb.html\">What is multiple regression doing?<\/a><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Not long after making my initial post in this series on variable selection in multiple regression, I received the following question on Twitter: The short answer is that lm() isn\u2019t&#8230; <a class=\"read-more-button\" href=\"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/08\/14\/what-is-multiple-regression-doing\/\">Read more &gt;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-768","post","type-post","status-publish","format-standard","hentry","category-statistics"],"_links":{"self":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/comments?post=768"}],"version-history":[{"count":3,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/768\/revisions"}],"predecessor-version":[{"id":776,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/768\/revisions\/776"}],"wp:attachment":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/media?parent=768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/categories?post=768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/tags?post=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}