Exercise

Creating a Regression Model With Interaction Effects: Part 2, Mediating and Moderating Effects

A CATE is basically an example of statistical moderation (also known as an interaction effect), where the effect of an independent variable is moderated by the effect of a second independent variable. A good example of moderation on a causal effect could be seen in your sink faucets. When your water valves are shut, water does not come out, but when you open your valves, water comes out. The valves are not the direct cause of water come out of your pipes - pressure is - but the valves moderate the relationship between the pressure in your pipes and your sink.

In other words, statistical moderation occurs when the size of one independent variable's effect on an outcome is affected by a second independent variable. In this example, we will find that gender moderates the effect of the treatment (downsizing HR) on someone's intention to leave Unter Technology. With the dataframe, UnterHR, construct three regression models: One that naively estimates the average treatment effect of reducing the size of Unter's HR department on employee turnover, a second that includes a statistical interaction (to allow for moderation) between treatment and gender (Female), and a third that includes interactions between treatment and gender (Female) and treatment and race (Race).

Instructions

100 XP
  • 1) Construct a regression model that measures the effect of Treatment on LeaveJob, mediated by Female
  • 2) Construct a regression model that measures the effect of Treatment on LeaveJob, mediated by Female and with an interaction effect between Treatment and Female
  • 3) Construct a regression model that measures the effect of Treatment on LeaveJob, mediated by Female and Race, with interaction effects between Treatment and Female and between Treatment and Race.