Hello Stata experts,
I am quite new to the use of Stata. Luckily I found this forum because I have a specific question and hope that you can help me with. I would like to use the DID approach to estimate the impact of an intervention on another variable [retention], and i'm not sure how to proceed. I am comparing two groups of individuals; one that received the intervention and another that did not. I have only three quarterly time points, 2 before the intervention, and one after. I am trying to follow this tutorial from princeton http://www.princeton.edu/~otorres/DID101.pdf but I have hit a block with the very first command. I am trying to create a dummy variable to indicate the time when the treatment started using the command [generate time = (quarter>=2017Q4)], but this returns the error [2017Q4 invalid name]. I entered the data manually, and formatted "quarter" as a numeric variable. I'm not sure what I'm doing wrong here.
Thanks
I am quite new to the use of Stata. Luckily I found this forum because I have a specific question and hope that you can help me with. I would like to use the DID approach to estimate the impact of an intervention on another variable [retention], and i'm not sure how to proceed. I am comparing two groups of individuals; one that received the intervention and another that did not. I have only three quarterly time points, 2 before the intervention, and one after. I am trying to follow this tutorial from princeton http://www.princeton.edu/~otorres/DID101.pdf but I have hit a block with the very first command. I am trying to create a dummy variable to indicate the time when the treatment started using the command [generate time = (quarter>=2017Q4)], but this returns the error [2017Q4 invalid name]. I entered the data manually, and formatted "quarter" as a numeric variable. I'm not sure what I'm doing wrong here.
Thanks
Comment