Hi Everyone,
I am trying to replicate the synthetic control method implemented by Abadie,Diamond, and Hainmueller.
I am using the following commands:
use "synth_smoking.dta"
tsset state year
synth cigsale beer lnincome retprice age15to24 cigsale(1988) cigsale(1980) cigsale(1975), trunit(3) trperiod(1989) xperiod(1980(1)1988) nested
Later I do placebo test using the following command:
tempname resmat
forvalues i = 1/4 {
synth cigsale retprice cigsale(1988) cigsale(1980) cigsale(1975) , trunit(`i') trperiod(1989) xperiod(1980(1)1988) keep(test`i')
matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
local names `"`names' `"`i'"'"'
}
mat colnames `resmat' = "RMSPE"
mat rownames `resmat' = "names"
matlist `resmat' , row("Treated Unit")
and I get the results but I do not know how to plot the results. Could anyone help me with plotting the results of the placebo test in a single graph?
I am not a native English speaker and also am new to Stata and econometrics; I am sorry if I used wrong terminology.
Thank you very much!
Related Posts with Stata Command for Graphing placebo test results
Log4j vulnerability (CVE-2021-44228 and subsequent CVE-2021-45046)Thank you James Hassell (StataCorp) for placing a comment regarding the Log4j vulnerability in Stata…
coefplot subgraphs by coefficients: how to loop subgraphs?Hi Statalist, I was referring to the coefplot trying to make subgraphs like this (below are example…
Create 2 new variables from existing variables: one date, and one with value equal to another variable's name Code: * Example generated by -dataex-. For more info, type help dataex clear input float(study_id r…
Foreach Loops for excel graph exportI could not figure out how to delete this post but no longer need it …
Why I got this error "independent variables are collinear with the panel variable id" when running the xtivreg?When running the code "xtivreg y (x = z) i.year##i.id, fe vce(cluster id)", I got this error "indepe…
Subscribe to:
Post Comments (Atom)
0 Response to Stata Command for Graphing placebo test results
Post a Comment