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
Question on Analysis using Panel Data Methodology.My study is the study of Bilateral trade relations: A Gravity Model analysis using Panel Data method…
How to access the dissimilarity (tau) parameters generated by nlogit via code?Hello I have been trying to access the dissimilarity (tau) parameters generated by nlogit, with no …
Creating tablesHi all, I have this regression line, and I would like to export this table from STATA to word. Cod…
Finding if a variable or string has overlapping charactersLet's say we have variable/string 'alex' 'luth' 'tex' , 'mav' is there a command in stata which let…
I imported data incorrectly. How to fix it.I imported the file that is in .txt, with the following code Code: import delimited file.txt, delim…
Subscribe to:
Post Comments (Atom)
0 Response to treated group with if condition
Post a Comment