I need help in understanding whether difference-in-difference or moderation is more suitable to test the effect of an event on the odds ratio in a logistic regression model.
@Zeinab "Difference in differences is a statistical technique used in econometrics and quantitative research in the social sciences that attempts to mimic an experimental research design using observational study data, by studying the differential effect of a treatment on a 'treatment group' versus a 'control group' in a natural experiment. It calculates the effect of a treatment (i.e., an explanatory variable or an independent variable) on an outcome (i.e., a response variable or dependent variable) by comparing the average change over time in the outcome variable for the treatment group to the average change over time for the control group." Whereas, moderation refers to the variation in the existing relationship between two or more valuables due to variation in the moderator variable and doesn't account for any treatment or event effect.
For a study using Difference in Differences technique, refer to the article referenced below:
Card, David; Krueger, Alan B. (1994). "Minimum Wages and Employment: A Case Study of the Fast-Food Industry in New Jersey and Pennsylvania". American Economic Review. 84 (4): 772–793.
Imran Anwar That is really helpful. Thank you so much.
Please I need a clarification: Why moderation cannot be used to study the effect of an event?
As far as I understand: Difference-in-difference requires a 2x2 matrix (controlled versus treated and before versus after the event). But I though moderation can be used to study an event (similar to the usage of difference-in-difference) BUT in a case where there is only a 1x2 dimension (before and after the event), and thus there is no controlled sample (all the sample is actually affected by the event during the event).
In such a case I am assuming that the usage of moderation is possible through treating the event as a dummy variable and including it in the model as a variable by itself as well as as an interaction with each of the predictor variables.
Hello Zeinab Elrashidy. It may be that not everyone is using "difference-in-differences" to refer to the same thing. For example, some of the resources I have looked at say quite explicitly that it is a technique that is used with observational data. But I think that some folks think of it more as a way to understand what it means to have a significant interaction. In a 2x2 design, which you mention, if variables A and B interact, it means that the A2-A1 difference at B1 differs from the A2-A1 difference at B2: I.e., there is a difference in differences. For this latter way of using the term, I see no reason why it has to be restricted to any particular type of data. And if that is the way you are using it, then yes, you can obtain identical results using a DID command and using a regression command. The attached text file contains an example using the user-written -diff- command for Stata and the -regress- command.