I create a treated variable, and a subdataset removing Spain from the data, and I try to run augsynth
I keep getting the following error and the dataset seems cannot be recognized. May I know what do I need to change in order to make the code run properly? Thanks
Multiple outcomes and one treatment time found. Running augsynth_multiout.
Error in select():
! Can't select columns that don't exist.
✖ Column datsubset doesn't exist.
Run rlang::last_trace() to see where the error occurred.
I try to run the augsynth code on Basque country using data from Abadie and Gardeazabal (2003)
library(pacman) library(SCtools) library("augsynth") p_load(Synth) dat<- readRDS("C:/Users/cxc220008/Desktop/basque.RDS")
dat$treated<- ifelse(dat$regionno == 17 & dat$year>1969, 1,0) datsubset <- subset(dat, dat$regionno>1) datsubset <- data.frame(datsubset) asyn <- augsynth(datsubset$gdpcap ~ datsubset$treated, datsubset$regionno, datsubset$year, datsubset)
I create a treated variable, and a subdataset removing Spain from the data, and I try to run augsynth
I keep getting the following error and the dataset seems cannot be recognized. May I know what do I need to change in order to make the code run properly? Thanks
Multiple outcomes and one treatment time found. Running augsynth_multiout. Error in
select()
: ! Can't select columns that don't exist. ✖ Columndatsubset
doesn't exist. Runrlang::last_trace()
to see where the error occurred.