Hello Members,
I have a pressing doubt in implementing the diff in diff in Stata 17. - didregress command.
My research question explores the impact of mobile phone usage on the crop yield of farmers. In this model, I have a continuous outcome (crop yield of farmers), treatment variable (usage of phones), few covariates (farm level variables), Time variable (crop season A and crop season B) and group variable - ??
The didregress requires the following command for cross sectional - repeated measures data -
"didregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar)"
In the current case, I have crop yield data (outcome variable) of 1000 farmers in two crop seasons (time-variable), whereas the treatment is the usage of phones (measured in number of minutes over the study period). Given the above command, my research question, and the data available, I have two doubts -
1. What is the group variable for the didregress model in this case? As you see, I am not giving intervention based on any groups. I thought each farmer was his/her own group. But I got errors while executing this
2. How do I implement continuous treatment variable in didregress? I know that we need to specify "(treatment_variable, continuous)" but that doesn't seem to work and throws errors.
Can someone please help me in this?
Regards
Related Posts with Difference in Differences with cross sectional data - continuous treatment (didregress)
Convergence not achieved with xtlogit, fe, but it does converge with xtlogit, reI am using xtlogit on the following data: input str2 st int date byte club float(combo l ca com) by…
Conditioning for values within a variable while using foreachHi everyone! I'm new to the forum, but here it goes. I have the following code, where I'm just tryin…
Escape code tags?\ Code: \ …
Line graph of the mean of all observationsHello all, I have data that have three variables: vehicle id, speed_kmh, and Time_of_Travel. I am …
updating data in stataI want to add a value for instance '45' for country 'BE' in year '2004' (the fist row of 2004) under…
Subscribe to:
Post Comments (Atom)
0 Response to Difference in Differences with cross sectional data - continuous treatment (didregress)
Post a Comment