Hi guys,
I'm doing an econometric paper analyzing the decriminalization of drugs in the Czech Republic and I'm trying to run a placebo test for my synthetic control method.
Here is the information from statas help command:
Example 5 Run placebo in space:
. tempname resmat
forvalues i = 1/4 {
synth cigsale retprice cigsale(1988) cigsale(1980) cigsale(1975) , trunit(`i') trperiod(1989) xperiod(1980(1)1988)
matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
local names `"`names' `"`i'"'"'
}
mat colnames `resmat' = "RMSPE"
mat rownames `resmat' = `names'
matlist `resmat' , row("Treated Unit")
This is a code example to run placebo studies by iteratively reassigning the intervention in space to the first four states. To do so, we simply run a four loop each where the trunit() setting is incremented in each
iteration. Thus, in the n of synth state number one is assigned to the intervention, in the second run state number two, etc, etc. In each run we store the RMSPE and display it in a matrix at the end.
And here is the error Im getting:
forvalues i = 1/4 {
2.
. synth homiciderate popurban neet2024 longtermun healthexpenditurepercapitappp gdppercap Tertiaryedu uppersecond prop1564 alclitpercap unemployr15 homiciderate(2004) hom
> iciderate(2006) homiciderate(2008),
3.
. trunit(1) trperiod(2009) xperiod(2004(1)2008)
4.
. matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
5.
. local names `"`names' `"`i'"'"'
6.
. }
option trunit() required
r(198);
.
. mat colnames `resmat' = "RMSPE"
matrix __000000 not found
r(111);
.
. mat rownames `resmat' = `names'
matrix __000000 not found
r(111);
.
. matlist `resmat' , row("Treated Unit")
__000000 not found
r(111);
Thanks in advance
I'm doing an econometric paper analyzing the decriminalization of drugs in the Czech Republic and I'm trying to run a placebo test for my synthetic control method.
Here is the information from statas help command:
Example 5 Run placebo in space:
. tempname resmat
forvalues i = 1/4 {
synth cigsale retprice cigsale(1988) cigsale(1980) cigsale(1975) , trunit(`i') trperiod(1989) xperiod(1980(1)1988)
matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
local names `"`names' `"`i'"'"'
}
mat colnames `resmat' = "RMSPE"
mat rownames `resmat' = `names'
matlist `resmat' , row("Treated Unit")
This is a code example to run placebo studies by iteratively reassigning the intervention in space to the first four states. To do so, we simply run a four loop each where the trunit() setting is incremented in each
iteration. Thus, in the n of synth state number one is assigned to the intervention, in the second run state number two, etc, etc. In each run we store the RMSPE and display it in a matrix at the end.
And here is the error Im getting:
forvalues i = 1/4 {
2.
. synth homiciderate popurban neet2024 longtermun healthexpenditurepercapitappp gdppercap Tertiaryedu uppersecond prop1564 alclitpercap unemployr15 homiciderate(2004) hom
> iciderate(2006) homiciderate(2008),
3.
. trunit(1) trperiod(2009) xperiod(2004(1)2008)
4.
. matrix `resmat' = nullmat(`resmat') \ e(RMSPE)
5.
. local names `"`names' `"`i'"'"'
6.
. }
option trunit() required
r(198);
.
. mat colnames `resmat' = "RMSPE"
matrix __000000 not found
r(111);
.
. mat rownames `resmat' = `names'
matrix __000000 not found
r(111);
.
. matlist `resmat' , row("Treated Unit")
__000000 not found
r(111);
Thanks in advance
Comment