Hello Statalist community,
I am doing an analysis using a diff in diff methodology. As I use Stata 17, I have the opportunity to use the command “didregress” and “estat trendplots”.
However, “estat trendplots” do not provide confidences intervals for the “Observed means” and “Liner-trends model”. It is quite easy to reproduce the “Observed means” graph and to add confidences intervals, but I struggle to even just reproduce the linear-trends model.
Is there a way to reproduce the exact same graph and to add the confidence interval? I think as it is a Stata command, there is no .ado that I could read to understand the process, am I right?
I add the code I use with didregress and an extract of my sample.
didregress (wdds hheadage hheadsex hhmemtotal i.year) (Treat) [pweight=perweight], group(region) time(period)
Thank you in advance.
Regards
I am doing an analysis using a diff in diff methodology. As I use Stata 17, I have the opportunity to use the command “didregress” and “estat trendplots”.
However, “estat trendplots” do not provide confidences intervals for the “Observed means” and “Liner-trends model”. It is quite easy to reproduce the “Observed means” graph and to add confidences intervals, but I struggle to even just reproduce the linear-trends model.
Is there a way to reproduce the exact same graph and to add the confidence interval? I think as it is a Stata command, there is no .ado that I could read to understand the process, am I right?
I add the code I use with didregress and an extract of my sample.
didregress (wdds hheadage hheadsex hhmemtotal i.year) (Treat) [pweight=perweight], group(region) time(period)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(wdds Treat Time Treatment hheadage hheadsex hhmemtotal) int year float period double perweight float region 0 0 1 0 31 1 3 2014 2 1.382122 47 0 0 0 1 36 1 6 2008 1 .83317 2 5 1 1 1 63 1 5 2014 2 .713237 2 0 0 0 0 27 1 4 2008 1 .999403 47 2 0 0 0 86 1 36 2005 0 1.294421 47 1 0 0 0 55 1 11 2008 1 .83317 1 0 0 1 0 24 1 2 2014 2 1.382122 47 0 0 1 0 41 1 3 2014 2 .713237 1 0 0 1 0 26 1 2 2014 2 .713237 1 4 0 1 0 30 1 4 2016 2 .97527 39 0 0 1 0 25 2 2 2016 2 .858931 39 0 0 1 0 28 1 3 2014 2 .863929 1 3 0 1 0 34 1 5 2014 2 .713237 1 2 0 0 0 53 2 8 2013 1 .278545 27 0 0 0 0 29 1 4 2005 0 .885734 47 2 0 0 1 35 1 6 2005 0 .709445 2 0 0 0 1 35 1 5 2011 1 1.283543 50 1 0 1 0 31 1 5 2014 2 1.121907 47 0 0 0 0 33 1 3 2008 0 1.223 27 0 0 0 1 37 1 6 2006 0 .868114 50 end
Regards
Comment