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
Unit Root Test For Panel dataHello, I am sorry if this would sound like trivial questions (I am new to longitudinal data analysis…
Drop individuals who have too many missingsHello everyone, I think this is quite a simple question but I am still not very used to STAT Cod…
Create a new variable from existing variables with similar value Hello, First of all i am extremely thankful to everyone whoever is helping with STATA. This forum …
Overlay line segments on graphArray I've generated the figure above and would like to make two line segments on the X-axis, one to…
Exporting results in a file to win timeI have results to register in a doc file or an excel file. It will be easier to have results after. …
Subscribe to:
Post Comments (Atom)
0 Response to treated group with if condition
Post a Comment