0

I am having trouble coming up with a diff-in-diff setting for an experiment in mind and would appreciate any advice or guidance.

Settings: We have a dataset containing the counts of daily activities (=outcome variable) of users for a time span between 2019-2020. At any time point within this 2-year period, a user (sample) could have received treatment or not, and we want to measure the treatment effect. We know that the treatment effect only lasts for a very short time (e.g., 1-2 days) and so we want to find out (1) whether the treatment has a significant effect and (2) how many days it lasts. For each treated user, we will consider the time series of seven days before and after the treatment. Each treated user has a matched user obtained through stratified PSM, and we will include the activities of the matched user during the same time period.

Based on my understanding of this thread, I came up with the following equation $$Y_{i,t,s}=\beta_0Dummy_{s}+\beta_1Dummy_{t}+\beta_2Interaction+\epsilon$$ where $Y_{i,t,s}$ is the outcome at day $t \in \{t_s-7,t_s-6,...,t_s,...,t_s+7\}$, $t_s$ is the day of treatment, $s$ is the strata of user $i$ and $Interaction$ is the indicator which is 1 only when (1) the user is in the treated group and (2) has received treatment ($t>=t_s$). How can I improve this model so that I can measure treatment effects and its changes as the days pass by (e.g., effect at day 0 vs day 7)?

  • Welcome. Do you know precisely *when* users enter into treatment? Is each user entering into treatment at different times? Or, do they become exposed in groups/waves? – Thomas Bilach May 21 '21 at 18:26
  • @ThomasBilach Thanks for the reply! In our setting the time that each user enters treatment is independent (e.g., user1 gets treated on Sept 28th and user2 on Jan 3rd). For each user we are using the data one week before and after the treatment. – CausalInfNewb May 22 '21 at 02:26
  • How far apart are some of the users’ exposures? Could it be more than seven days? And if you don’t mind me asking, why do you only consider a week before and a week after treatment? – Thomas Bilach May 22 '21 at 03:57
  • @ThomasBilach We consider a time span of 1.5 years, and exposure can happen any day during that period (for example whether an unexpected life event may happen to you). So even between treated users, exposure can happen very far apart (more than 7 days). We considered looking into one week before and after treatment because at this stage we want to see people's immediate response to the effect, which we plan to observe using the coefficients of the lagged variables. Please feel free to correct me if there's something I am doing wrong. – CausalInfNewb May 22 '21 at 05:00
  • Because of the wide timespan in our data, each treated user is matched to a number of control users who have similar covariates and activity levels prior to the date the treated user received the shock, calculated through PSM. – CausalInfNewb May 22 '21 at 05:04

0 Answers0