{"id":836,"date":"2019-09-23T08:00:00","date_gmt":"2019-09-23T12:00:00","guid":{"rendered":"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/?p=836"},"modified":"2019-09-21T08:34:41","modified_gmt":"2019-09-21T12:34:41","slug":"using-projection-predictiion-for-variable-selection-in-a-bayesian-regression","status":"publish","type":"post","link":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/09\/23\/using-projection-predictiion-for-variable-selection-in-a-bayesian-regression\/","title":{"rendered":"Using projection predictiion for variable selection in a Bayesian regression"},"content":{"rendered":"\r\n<p><a href=\"#\">Variable selection in multiple regression<\/a><\/p>\r\n\r\n\r\n\r\n<p><a href=\"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/09\/16\/a-bayesian-approach-to-variable-selection-using-horseshoe-priors\/\">Horseshoe priors<\/a> are very easy to use if you\u2019re using <code>rstanarm<\/code>. You should consider using them in any analysis where you use <code>stan_glm()<\/code> or <code>stan_glmer()<\/code>. If you were paying attention, though, I did a bit (OK, more than a bit) of handwaving in deciding which covariates were \u201cimportant\u201d. In this example, it was pretty easy, because there were some covariates with posterior distributions well away from zero and others with posterior distributions (close to) centered on zero and the difference between the two sets of coefficients was easy to see. That won\u2019t always be the case. In fact, it probably won\u2019t usually be the case. So we\u2019d like to have some way of more \u201cobjectively\u201d identifying which covariates are important and which aren\u2019t.<\/p>\r\n\r\n\r\n\r\n<p>Thats where <a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/variable-selection\/projection-predictive-variable-selection.nb.html\">projection predictive variable selection<\/a> comes in. It\u2019s an approach that uses a statistically meaningful criterion to guide your choice of variables that are \u201cimportant\u201d in the sense that including those variables (and only those variables) is sufficient to give predictions roughly equivalent to including all of them. Again, if you\u2019re using <code>rstanarm<\/code>, it\u2019s very easy to take advantage of the approach thanks to the <code>projpred<\/code> package available on CRAN.<\/p>\r\n\r\n\r\n\r\n<p>In case you missed the link to projection predictive variable selection, here it is again: <a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/variable-selection\/projection-predictive-variable-selection.nb.html\">http:\/\/darwin.eeb.uconn.edu\/pages\/variable-selection\/projection-predictive-variable-selection.nb.html<\/a>.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Variable selection in multiple regression Horseshoe priors are very easy to use if you\u2019re using rstanarm. You should consider using them in any analysis where you use stan_glm() or stan_glmer()&#8230;. <a class=\"read-more-button\" href=\"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2019\/09\/23\/using-projection-predictiion-for-variable-selection-in-a-bayesian-regression\/\">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-836","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\/836","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=836"}],"version-history":[{"count":4,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/836\/revisions"}],"predecessor-version":[{"id":838,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/836\/revisions\/838"}],"wp:attachment":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/media?parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/categories?post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/tags?post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}