Permutation test by Sectors
LA_MTNF_Change2015 <- read.csv("TWO TNF LA.csv")
LA_MTNF_Change2015<-select(LA_MTNF_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MTNF_Change2015$chan_per<-(LA_MTNF_Change2015$Singe_CONTROL-LA_MTNF_Change2015$TRUE_VAL)/LA_MTNF_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MTNF_Change2015$Group<-as.Date(LA_MTNF_Change2015$Group)
#LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MTNF_Change2015$chan_per1<-(LA_MTNF_Change2015$TRUE_VAL-as.numeric(LA_MTNF_Change2015[8,6]))/as.numeric(LA_MTNF_Change2015[8,6])
Plot.TNF<-ggplot(LA_MTNF_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Total\n Nonfarm")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.TNF

#####################
LA_MAER_Change2015 <- read.csv("TWO AER LA.csv")
LA_MAER_Change2015<-select(LA_MAER_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MAER_Change2015$chan_per<-(LA_MAER_Change2015$Singe_CONTROL-LA_MAER_Change2015$TRUE_VAL)/LA_MAER_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MAER_Change2015$Group<-as.Date(LA_MAER_Change2015$Group)
## Creating Plot
LA_MAER_Change2015$chan_per1<-(LA_MAER_Change2015$TRUE_VAL-as.numeric(LA_MAER_Change2015[8,6]))/as.numeric(LA_MAER_Change2015[8,6])
Plot.AER<-ggplot(LA_MAER_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Arts, Entertainment,\n and Recreation")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.AER

#####################
LA_MAF_Change2015 <- read.csv("TWO AF LA.csv")
LA_MAF_Change2015<-select(LA_MAF_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MAF_Change2015$chan_per<-(LA_MAF_Change2015$Singe_CONTROL-LA_MAF_Change2015$TRUE_VAL)/LA_MAF_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MAF_Change2015$Group<-as.Date(LA_MAF_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MAF_Change2015$chan_per1<-(LA_MAF_Change2015$TRUE_VAL-as.numeric(LA_MAF_Change2015[8,6]))/as.numeric(LA_MAF_Change2015[8,6])
Plot.AF<-ggplot(LA_MAF_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Accommodation and \n Food Services")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.AF

#####################
LA_MASW_Change2015 <- read.csv("TWO ASW LA.csv")
LA_MASW_Change2015<-select(LA_MASW_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MASW_Change2015$chan_per<-(LA_MASW_Change2015$Singe_CONTROL-LA_MASW_Change2015$TRUE_VAL)/LA_MASW_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MASW_Change2015$Group<-as.Date(LA_MASW_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MASW_Change2015$chan_per1<-(LA_MASW_Change2015$TRUE_VAL-as.numeric(LA_MASW_Change2015[8,6]))/as.numeric(LA_MASW_Change2015[8,6])
Plot.ASW<-ggplot(LA_MASW_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("ASW")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.ASW

#####################
LA_MCON_Change2015 <- read.csv("TWO CON LA.csv")
LA_MCON_Change2015<-select(LA_MCON_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MCON_Change2015$chan_per<-(LA_MCON_Change2015$Singe_CONTROL-LA_MCON_Change2015$TRUE_VAL)/LA_MCON_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MCON_Change2015$Group<-as.Date(LA_MCON_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MCON_Change2015$chan_per1<-(LA_MCON_Change2015$TRUE_VAL-as.numeric(LA_MCON_Change2015[8,6]))/as.numeric(LA_MCON_Change2015[8,6])
Plot.CON<-ggplot(LA_MCON_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Construction")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.CON

#####################
LA_MES_Change2015 <- read.csv("TWO ES LA.csv")
LA_MES_Change2015<-select(LA_MES_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MES_Change2015$chan_per<-(LA_MES_Change2015$Singe_CONTROL-LA_MES_Change2015$TRUE_VAL)/LA_MES_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MES_Change2015$Group<-as.Date(LA_MES_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MES_Change2015$chan_per1<-(LA_MES_Change2015$TRUE_VAL-as.numeric(LA_MES_Change2015[8,6]))/as.numeric(LA_MES_Change2015[8,6])
Plot.ES<-ggplot(LA_MES_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Educational \n Services")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.ES

#####################
LA_MFI_Change2015 <- read.csv("TWO FI LA.csv")
LA_MFI_Change2015<-select(LA_MFI_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MFI_Change2015$chan_per<-(LA_MFI_Change2015$Singe_CONTROL-LA_MFI_Change2015$TRUE_VAL)/LA_MFI_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MFI_Change2015$Group<-as.Date(LA_MFI_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MFI_Change2015$chan_per1<-(LA_MFI_Change2015$TRUE_VAL-as.numeric(LA_MFI_Change2015[8,6]))/as.numeric(LA_MFI_Change2015[8,6])
Plot.FI<-ggplot(LA_MFI_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Financial \n Insurance")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.FI

#####################
LA_MGOV_Change2015 <- read.csv("TWO GOV LA.csv")
LA_MGOV_Change2015<-select(LA_MGOV_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MGOV_Change2015$chan_per<-(LA_MGOV_Change2015$Singe_CONTROL-LA_MGOV_Change2015$TRUE_VAL)/LA_MGOV_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MGOV_Change2015$Group<-as.Date(LA_MGOV_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MGOV_Change2015$chan_per1<-(LA_MGOV_Change2015$TRUE_VAL-as.numeric(LA_MGOV_Change2015[8,6]))/as.numeric(LA_MGOV_Change2015[8,6])
Plot.GOV<-ggplot(LA_MGOV_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Government")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.GOV

#####################
LA_MHCS_Change2015 <- read.csv("TWO HCS LA.csv")
LA_MHCS_Change2015<-select(LA_MHCS_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MHCS_Change2015$chan_per<-(LA_MHCS_Change2015$Singe_CONTROL-LA_MHCS_Change2015$TRUE_VAL)/LA_MHCS_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MHCS_Change2015$Group<-as.Date(LA_MHCS_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MHCS_Change2015$chan_per1<-(LA_MHCS_Change2015$TRUE_VAL-as.numeric(LA_MHCS_Change2015[8,6]))/as.numeric(LA_MHCS_Change2015[8,6])
Plot.HCS<-ggplot(LA_MHCS_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Health Care and \n Social Assistance")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.HCS

#####################
LA_MINF_Change2015 <- read.csv("TWO INF LA.csv")
LA_MINF_Change2015<-select(LA_MINF_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MINF_Change2015$chan_per<-(LA_MINF_Change2015$Singe_CONTROL-LA_MINF_Change2015$TRUE_VAL)/LA_MINF_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MINF_Change2015$Group<-as.Date(LA_MINF_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MINF_Change2015$chan_per1<-(LA_MINF_Change2015$TRUE_VAL-as.numeric(LA_MINF_Change2015[8,6]))/as.numeric(LA_MINF_Change2015[8,6])
Plot.INF<-ggplot(LA_MINF_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Information")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.INF

#####################
LA_MMCE_Change2015 <- read.csv("TWO MCE LA.csv")
LA_MMCE_Change2015<-select(LA_MMCE_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MMCE_Change2015$chan_per<-(LA_MMCE_Change2015$Singe_CONTROL-LA_MMCE_Change2015$TRUE_VAL)/LA_MMCE_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MMCE_Change2015$Group<-as.Date(LA_MMCE_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MMCE_Change2015$chan_per1<-(LA_MMCE_Change2015$TRUE_VAL-as.numeric(LA_MMCE_Change2015[8,6]))/as.numeric(LA_MMCE_Change2015[8,6])
Plot.MCE<-ggplot(LA_MMCE_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Management of Companies \n and Enterprises")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.MCE

#####################
LA_MMAN_Change2015 <- read.csv("TWO MAN LA.csv")
LA_MMAN_Change2015<-select(LA_MMAN_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MMAN_Change2015$chan_per<-(LA_MMAN_Change2015$Singe_CONTROL-LA_MMAN_Change2015$TRUE_VAL)/LA_MMAN_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MMAN_Change2015$Group<-as.Date(LA_MMAN_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MMAN_Change2015$chan_per1<-(LA_MMAN_Change2015$TRUE_VAL-as.numeric(LA_MMAN_Change2015[8,6]))/as.numeric(LA_MMAN_Change2015[8,6])
Plot.MAN<-ggplot(LA_MMAN_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Manufacturing")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.MAN

#####################
LA_MOS_Change2015 <- read.csv("TWO OS LA.csv")
LA_MOS_Change2015<-select(LA_MOS_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MOS_Change2015$chan_per<-(LA_MOS_Change2015$Singe_CONTROL-LA_MOS_Change2015$TRUE_VAL)/LA_MOS_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MOS_Change2015$Group<-as.Date(LA_MOS_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MOS_Change2015$chan_per1<-(LA_MOS_Change2015$TRUE_VAL-as.numeric(LA_MOS_Change2015[8,6]))/as.numeric(LA_MOS_Change2015[8,6])
Plot.OS<-ggplot(LA_MOS_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Other \n Services")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.OS

#####################
LA_MRE_Change2015 <- read.csv("TWO RE LA.csv")
LA_MRE_Change2015<-select(LA_MRE_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MRE_Change2015$chan_per<-(LA_MRE_Change2015$Singe_CONTROL-LA_MRE_Change2015$TRUE_VAL)/LA_MRE_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MRE_Change2015$Group<-as.Date(LA_MRE_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MRE_Change2015$chan_per1<-(LA_MRE_Change2015$TRUE_VAL-as.numeric(LA_MRE_Change2015[8,6]))/as.numeric(LA_MRE_Change2015[8,6])
Plot.RE<-ggplot(LA_MRE_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Real Estate, Rental \n and Leasing")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.RE

#####################
LA_MRT_Change2015 <- read.csv("TWO RT LA.csv")
LA_MRT_Change2015<-select(LA_MRT_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MRT_Change2015$chan_per<-(LA_MRT_Change2015$Singe_CONTROL-LA_MRT_Change2015$TRUE_VAL)/LA_MRT_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MRT_Change2015$Group<-as.Date(LA_MRT_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MRT_Change2015$chan_per1<-(LA_MRT_Change2015$TRUE_VAL-as.numeric(LA_MRT_Change2015[8,6]))/as.numeric(LA_MRT_Change2015[8,6])
Plot.RT<-ggplot(LA_MRT_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Retail \n Trade")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.RT

#####################
LA_MTWU_Change2015 <- read.csv("TWO TWU LA.csv")
LA_MTWU_Change2015<-select(LA_MTWU_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MTWU_Change2015$chan_per<-(LA_MTWU_Change2015$Singe_CONTROL-LA_MTWU_Change2015$TRUE_VAL)/LA_MTWU_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MTWU_Change2015$Group<-as.Date(LA_MTWU_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MTWU_Change2015$chan_per1<-(LA_MTWU_Change2015$TRUE_VAL-as.numeric(LA_MTWU_Change2015[8,6]))/as.numeric(LA_MTWU_Change2015[8,6])
Plot.TWU<-ggplot(LA_MTWU_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Transportation, \n Warehousing, and Utilities")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.TWU

#####################
LA_MWT_Change2015 <- read.csv("TWO WT LA.csv")
LA_MWT_Change2015<-select(LA_MWT_Change2015,State,Group,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MWT_Change2015$chan_per<-(LA_MWT_Change2015$Singe_CONTROL-LA_MWT_Change2015$TRUE_VAL)/LA_MWT_Change2015$Singe_CONTROL
## Clean time Because it chnage due the format of date
LA_MWT_Change2015$Group<-as.Date(LA_MWT_Change2015$Group)
LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
LA_MWT_Change2015$chan_per1<-(LA_MWT_Change2015$TRUE_VAL-as.numeric(LA_MWT_Change2015[8,6]))/as.numeric(LA_MWT_Change2015[8,6])
Plot.WT<-ggplot(LA_MWT_Change2015,aes(x=Group))+geom_line(aes(y=chan_per1,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Wholesale \n Trade")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.WT

################################
LA_MSPS_Change2015 <- read.csv("TWO SPS LA.csv")
#LA_MSPS_Change2015<-select(LA_MSPS_Change2015,State,DATE,SDID_TE,Estimate,Singe_CONTROL,TRUE_VAL)
LA_MSPS_Change2015$chan_per<-(LA_MSPS_Change2015$Singe_CONTROL-LA_MSPS_Change2015$TRUE_VAL)/LA_MSPS_Change2015$Singe_CONTROL
colnames(LA_MSPS_Change2015)[3]<-"Group"
## Clean time Because it chnage due the format of date
LA_MSPS_Change2015$Group<-as.Date(LA_MSPS_Change2015$Group)
#LA082005 <- read_excel("LA082005.xlsx") #Obs for 2005-08-01
## Creating Plot
#LA_MSPS_Change2015$chan_per1<-(LA_MSPS_Change2015$TRUE_VAL-as.numeric(LA_MSPS_Change2015[8,6]))/as.numeric(LA_MSPS_Change2015[8,6])
Plot.SPS<-ggplot(LA_MSPS_Change2015,aes(x=Group))+geom_line(aes(y=Change_OBS,colour="post-pre estimation"))+
geom_line(aes(y=-chan_per,colour="SDID estimation"))+
scale_colour_manual("",breaks = c("post-pre estimation","SDID estimation"),values = c("red","Sky blue"))+
theme_bw()+geom_hline(yintercept = 0,linetype=2)+geom_vline(xintercept = as.Date("2005-08-01"),linetype="dotdash")+
theme(legend.position = c(0.12,0.8),legend.background = element_blank(),
axis.text = element_text(size = 9),axis.title = element_text(size=7))+
xlab("Time")+ylab("Professional,Scientific, \n and Technical Services")+scale_y_continuous(labels = scales::percent_format(accuracy =1))#+
#annotate("rect", xmin = as.Date("2005-09-01"), xmax = as.Date("2008-01-01"), ymin = -Inf, ymax = Inf, alpha = .4, fill = "gray")
Plot.SPS

plot2<-ggarrange(Plot.TNF,Plot.GOV,Plot.HCS,
Plot.AF,Plot.RT,Plot.CON,
Plot.OS,Plot.ES,Plot.MAN,
Plot.ASW,Plot.AER,Plot.TWU,
Plot.WT,Plot.FI,Plot.INF,
Plot.RE,Plot.MCE,Plot.SPS,
nrow = 6,ncol = 3,legend = "bottom",common.legend = TRUE)
plot2
