Hello everyone,
I am relatively new to Stata and I am trying to create a dummy variable to identify the treated group and the control group.
My dataset contains two observations for every id, one in 2014 and one in 2016 (identified by the dummy year=1 if the year is 2016). The Law I'm trying to analyze was valid only for firms with more than 15 employees BEFORE 2016: this subset of firms is the treated group. I have used:
replace treated=1 if dimaz>2 & year16==0
where dimaz is the number of employees (2 is just the range)
But the firm should be considered treated also in year 2016!
Which command should I use?
Thank you!
Related Posts with treated group with if condition
OR from multi-level fixed logistic regression modelI have a dataset comparing approach 1 vs approach 2 for an measurement, the total events rate in bot…
margins after mlogit not estimable - why?HI all, Ran the below multinomial logit model and some of the margins are not estimable. What are so…
Labeling Dummy VariablesHi This may sound silly but I am having problems labeling the Stata output from 0 to YES and 1 to NO…
Generating index numbers with panel data Hello, Would anyone know whether there exists a possibility to generate index numbers over time wit…
Applying macro to local data file locationHi I hope this is clear enough-- I have read that I should create a new directory to be able to hide…
Subscribe to:
Post Comments (Atom)
0 Response to treated group with if condition
Post a Comment