I am currently doing an analysis of the effect of taxation on the institutions of a country. I am using the synthetic controls method to determine the treatment effect on Bolivia. The synth() command works fine, the placebo (with country 8 = Bhutan instead of country 9 = Bolivia) does however not. It generates the repeated error message:
Error in solve.default(AP, c(c.x, c.y)) : system is computationally singular: reciprocal condition number = 9.90619e-17
I have attached the code. You can find the dataset under the following link: totalB-Dataset
I cannot figure out why the first synth() command works while the exact same only with a different country does not. I have tried using a larger tolerance. Additionally, I have run a regression and do not detect singularity there.
I would very much appreciate any help!
creates matrices to provide inputs for synth()
dataprep.out <-
dataprep(foo = totalB,
predictors = c("vdem_corr",
"fh_ipolity2",
"TotTax",
"TotRev") ,
predictors.op = "mean" ,
time.predictors.prior = 1990:1998 ,
special.predictors = list(
list("gle_rgdpc" , 1990:1998 , "mean"),
list("wdi_educ" , seq(1990,1998,2), "mean"),
list("gle_pop", seq(1990,1998,2), "mean"),
list("wdi_urb" , seq(1990,1998,2), "mean"),
list("wdi_popdens", 1998, "mean"),
list("wdi_land", 1998, "mean"),
list("conflict", 1998, "mean")
),
dependent = "political_abs",
unit.variable = "countryID",
unit.names.variable = "country",
time.variable = "year",
treatment.identifier = 9,
controls.identifier = c(1:8,10:74),
time.optimize.ssr = 1990:1998,
time.plot = 1990:2010
)
synth.out <- synth(data.prep.obj = dataprep.out,
method = "BFGS")
Now Placebo-test:
dataprep.out <-
dataprep(foo = totalB,
predictors = c("vdem_corr",
"fh_ipolity2",
"TotTax",
"TotRev") ,
predictors.op = "mean" ,
time.predictors.prior = 1990:1998 ,
special.predictors = list(
list("gle_rgdpc" , 1990:1998 , "mean"),
list("wdi_educ" , seq(1990,1998,2), "mean"),
list("gle_pop", seq(1990,1998,2), "mean"),
list("wdi_urb" , seq(1990,1998,2), "mean"),
list("wdi_popdens", 1998, "mean"),
list("wdi_land", 1998, "mean"),
list("conflict", 1998, "mean")
),
dependent = "political_abs",
unit.variable = "countryID",
unit.names.variable = "country",
time.variable = "year",
treatment.identifier = 8,
controls.identifier = c(1:7,9:74),
time.optimize.ssr = 1990:1998,
time.plot = 1990:2010
)
synth.out <- synth(data.prep.obj = dataprep.out,
method = "BFGS")