Closed OscarAndresMartinez closed 1 year ago
Hi Oscar,
jwdid
instead of etwfe
. See Fernando's thorough walkthrough here: https://friosavila.github.io/playingwithstata/drdid/jwdid_stata.htmlmpdta
dataset that I use in the examples, the gvar variable("first.treat") was already created by the dataset authors. There's not enough information to create it from the other columns.Closing, but feel free to reply if you're still stuck.
Dear Professor Greetings, I've been reading your etwfe code but I'm having a little problem with the gvar variable, my treatment is cumulative percentage km2 of protected areas (percentacumestricta) and outcome (RLI) these variables are continuous and I have data from 2000 to 2014 by country (ID) -year (t).
treated=1 if percentacumestricta >17
I created gvar variable: bysort ID: egen min_year=min(year) if treated==1 bysort ID: egen First_treated=max(min_year) replace First_treated=0 if First_treated==. tab year First_treated
However I couldn´t understand how you create your gvar, Could you explain me that please?
I really appreciate your comments Thanks for your time All the best