You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
A control variable in a regression is a regressor which is of limited or no direct interest to your study, but which must be accounted for to avoid or reduce omitted variable bias. So, it enters the regression as any other independent variable, only you decide its status as a control variable based on your research questions. For example, below using the Grunfeld dataset, if I want to include time as a control variable, I simply include the variable "time" as a regressor.
Code:
webuse grunfeld, clear
regress invest mvalue kstock time
Andrew Musau Yeah I understand this but the nature of my estimation technique is slightly different because it’s difference in difference estimation. So I’m trying to have a control and a treatment variable. So that when I use xtdidregress I can see a future year like 2016 and a pre year like 2015 when I regress.
Your question is not clear. In DID, you define an indicator equal to one if \(unit\; i\) in \(year\; t\) is subject to the treatment and zero otherwise. I do not have Stata 17, so I cannot help you with how to do the estimation using xtdidregress. If your issue is about the command and you have read the documentation and still have problems, I suggest that you start a new thread and title it appropriately so that those who are familiar with the command can help you. If on the other hand you are not clear about your research question, you should talk to your supervisor.
Comment