{"id":13262,"date":"2019-01-14T05:00:21","date_gmt":"2019-01-14T11:00:21","guid":{"rendered":"http:\/\/marcfbellemare.com\/wordpress\/?p=13262"},"modified":"2019-01-14T10:54:10","modified_gmt":"2019-01-14T16:54:10","slug":"metrics-monday-front-door-criterion-follow-up","status":"publish","type":"post","link":"https:\/\/marcfbellemare.com\/wordpress\/13262","title":{"rendered":"&#8216;Metrics Monday: Front-Door Criterion Follow-Up (Updated)"},"content":{"rendered":"\n<p>My <a href=\"http:\/\/marcfbellemare.com\/wordpress\/13244\">last post in this series<\/a>, on how to use Pearl&#8217;s front-door criterion in a regression context, generated lots of page views as well as lots of commentary on Twitter&#8211;enough so that I thought a follow-up post might be useful.<\/p>\n\n\n\n<p>Recall that with outcome Y, treatment X, mechanism M, and an unobserved confounder U affecting both Y and X but not M, the method I outlined in the post is pretty simple:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Regress M on X, get b_{MX}, the coefficient on X.<\/li><li>Regress Y on X and M, get b_{YM}, the coefficient on M.<\/li><li>The product of b_{MX} and b_{YM} is the effect of treatment X on outcome Y estimated by the front-door criterion.<\/li><\/ol>\n\n\n\n<p>One of the things that came up on Twitter was whether someone should use the procedure outlined above, or do the following instead:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Regress M on X, get \\hat{e}, the residual.<\/li><li>Regress Y on \\hat{e}, get b_Ye, the coefficient on \\hat{e}.<\/li><li>Regress M on X, get b_{MX}, the coefficient on X.<\/li><li> The product of b_{Ye} andb_{MX} is the effect of treatment X on outcome Y estimated by the front-door criterion.<\/li><li><\/li><\/ol>\n\n\n\n<p>Note that the two methods yield the exact same treatment effect. Here is a <a href=\"https:\/\/jasonkerwin.com\/nonparibus\/2015\/03\/27\/understanding-heterogeneous-treatment-effect-estimation-using-proof-by-stata\/\">Kerwinian<\/a> proof by Stata:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>clear<br>drop _all<br>set obs 1000<\/p><p>set seed 123456789<br>gen u = rnormal(0,1)<br>gen treat = u + rnormal(0,1)<br>gen mech = -0.3 * treat + rnormal(0,1)<br>gen outcome = 0.5 * mech + u + rnormal(0,1)<\/p><p>sureg (mech treat) (outcome mech treat)<br>nlcom [mech]_b[treat]*[outcome]_b[mech]<\/p><p><\/p><p>reg mech treat<br>predict e, resid<\/p><p>reg outcome e<br>matrix a = _b[e]<br>reg mech treat<br>matrix b = _b[treat]<br>matrix c = a*b<\/p><p>matrix list c<\/p><\/blockquote>\n\n\n\n<p>Note how the estimate obtained in the line that begins with -nlcom- and the line that begins with -matrix list- are identical. In terms of implementation, I prefer the (somewhat old-fashioned, I realize) use of seemingly unrelated regression, since it allows the error terms to be correlated across the two component regressions.<\/p>\n\n\n\n<p>To reiterate what I talked about at the end of my last post: <em>Caveat emptor<\/em>. When it comes to observational data, rare is the scenario where one can claim that the mechanism M whereby an endogenous treatment X is entirely unaffected by the unobserved confounders U that simultaneously affect treatment X and outcome Y. So this post and the previous one are really meant to be illustrative of something that might work in some rare situations more than an encouragement to apply the front-door criterion unthinkingly as a means of identifying a causal relationship on the cheap. In this as in so many things, <a href=\"https:\/\/en.wikipedia.org\/wiki\/There_ain%27t_no_such_thing_as_a_free_lunch\">TINSTAAFL<\/a>.<\/p>\n\n\n\n<p>On Twitter, Daniel Millimet adds:<\/p>\n\n\n\n<figure class=\"wp-block-embed-twitter wp-block-embed is-type-rich is-provider-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Nice post, but in addition to the caveat at the end about M being indpt of U, imho you should state that this estimates only one aspect of the TE unless one can specify all Ms thru which X affects Y.<\/p>&mdash; Daniel Millimet \ud83c\uddfa\ud83c\udde6 (@dlmillimet) <a href=\"https:\/\/twitter.com\/dlmillimet\/status\/1084840434592038914?ref_src=twsrc%5Etfw\">January 14, 2019<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>My last post in this series, on how to use Pearl&#8217;s front-door criterion in a regression context, generated lots of page views as well as&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/marcfbellemare.com\/wordpress\/13262\">Continue reading<span class=\"screen-reader-text\">&#8216;Metrics Monday: Front-Door Criterion Follow-Up (Updated)<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13262","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1gPg8-3rU","_links":{"self":[{"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/posts\/13262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=13262"}],"version-history":[{"count":6,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/posts\/13262\/revisions"}],"predecessor-version":[{"id":13273,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/posts\/13262\/revisions\/13273"}],"wp:attachment":[{"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=13262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=13262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marcfbellemare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=13262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}