Hi, guys. I'm working on my synthetic control study and something is wrong with my code. R somehow puts my treated country into both the treated and controls list.
treatment.identifier <- "Russian Federation"
controls.identifier <- setdiff(colnames(Project[[1]]),
c("Kazakhstan", "Belarus"))
times.dep <- cbind("rgdpna" = c(1991,2009))
times.pred <- cbind("csh_g" = c(1991,2009),
"csh_c" = c(1991,2009),
"csh_i" = c(1991,2009),
"csh_m" = c(1991,2009),
"csh_x" = c(1991,2009),
"rgdpna" = c(1991,2009),
"csh_prod" = c(1991,2009),
"csh_emp" = c(1991,2009))
agg.fns <- rep("mean", ncol(times.pred))
res <- mscmt(Project, treatment.identifier, controls.identifier, times.dep,
times.pred, agg.fns, seed = 42)
Firstly, R puts Russia into treated and controls. Secondly, there is a mistake Error in lst[[nam]][intersect(tim, rownames(lst[[nam]])), cols, drop = FALSE] :
subscript out of bounds. How do I fix this? Thanks in advance!