Hi,
I am currently working on a comparative case study where I try to analyse the impact of a sugar tax on diabetes rates. I installed and used the synth command provided by Jens Hainmueller on his website https://web.stanford.edu/~jhain/synthpage.html and creating the synthetic control group worked perfectly fine. I then used the code he provided under the help command to run the placebo tests. the Problem is, I don't really understand how the tests are stored and I don't know how to plot them, either (especially not in the same graph).
This is the code I used
synth dependentvariable independentvariables, trunit(6) trperiod(2005) xperiod(1994(1)2004)
tempname resmat
forvalues i = 1/14 {
synth ependentvariable independentvariables, trunit(`i') trperiod(2005) xperiod(1994(1)2004)
matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
local names `"`names' `"`i'"'"'
}
mat colnames `resmat' = "RMSPE"
mat rownames `resmat' = `names'
matlist `resmat' , row("Treated Unit")
Thank you so much for any advice on this!
Have a good weekend,
Dustin
I am currently working on a comparative case study where I try to analyse the impact of a sugar tax on diabetes rates. I installed and used the synth command provided by Jens Hainmueller on his website https://web.stanford.edu/~jhain/synthpage.html and creating the synthetic control group worked perfectly fine. I then used the code he provided under the help command to run the placebo tests. the Problem is, I don't really understand how the tests are stored and I don't know how to plot them, either (especially not in the same graph).
This is the code I used
synth dependentvariable independentvariables, trunit(6) trperiod(2005) xperiod(1994(1)2004)
tempname resmat
forvalues i = 1/14 {
synth ependentvariable independentvariables, trunit(`i') trperiod(2005) xperiod(1994(1)2004)
matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
local names `"`names' `"`i'"'"'
}
mat colnames `resmat' = "RMSPE"
mat rownames `resmat' = `names'
matlist `resmat' , row("Treated Unit")
Thank you so much for any advice on this!
Have a good weekend,
Dustin