ebenmichael / augsynth

Augmented Synthetic Control Method
MIT License
147 stars 52 forks source link

Not taking the treatment variable #51

Closed juancamilo1020 closed 3 years ago

juancamilo1020 commented 3 years ago

Hi everyone,

Mi name is Juan and I'm trying to do an application of the augsynth package in R (R-studio) for an application of the staggered synthetic control method, but I always receive as result that, although the program gives me some results, as you can see in the PDF file of the URL im leaving behind, I think the code is not taking my treatment variable well (which I call the same you called in your application: cbr), as you will see in the graphs at the end of the PDF. I'll leave you behind a repository that I created with the info required to see my problem.

Thank you very much for your help.

https://github.com/juancamilo1020/augsynth_application

`#install.packages("devtools")

devtools::install_github("ebenmichael/augsynth")

install.packages('ggrepel')

library(magrittr) library(dplyr) library(augsynth) library(tidyverse) library(haven) library(ggrepel) datos <- read_dta(file="/Users/juancamiloperdomo/OneDrive/CNC/ADS-SGR/Base/Stata/Base_des_mun.dta")

datos %>% filter(#!State %in% c("DC", "WI"), AÑO >= 2007, AÑO <= 2019) %>% mutate(prim_año_ejec2 = ifelse(is.na(prim_año_ejec2), Inf, prim_año_ejec2), cbr = 1 * (AÑO >= prim_año_ejec2)) -> analysis_df2 ppool_syn <- multisynth(form = Muertos_eventos_emergencia ~ cbr, unit = codmpio, time = AÑO, data = analysis_df2) print(ppool_syn$nu) ppool_syn ppool_syn_summ <- summary(ppool_syn) ppool_syn_summ plot(ppool_syn_summ)`

ebenmichael commented 3 years ago

Hi, so sorry for the delay here. What's the issue that you're running in to? I can't see the problem in the PDF you linked to.

juancamilo1020 commented 3 years ago

Hi,

I’ve already solved the issue. Do you want me to delete the publication at GitHub?

De: Eli Ben-Michael @.> Fecha: martes, 10 de agosto de 2021 a las 11:02 a. m. Para: ebenmichael/augsynth @.> CC: Juan Camilo Perdomo Rico @.>, Author @.> Asunto: Re: [ebenmichael/augsynth] Not taking the treatment variable (#51)

Hi, so sorry for the delay here. What's the issue that you're running in to? I can't see the problem in the PDF you linked to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ebenmichael/augsynth/issues/51#issuecomment-896105913, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ7FVYJIOWIECGCNJU7B27TT4E5OTANCNFSM467MV6HA.