Permutation test For All Employee Sectors

RESULT<- read_excel("New RESULT AER V2 Permutattion.xlsx")
AER_Per<- read_excel("New Employee Gap AER V2 Permutation.xlsx")


LA_AER.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_AER.Result$MSE_pre[1])

AER_Per$Chan<-AER_Per$AER-AER_Per$`sdid-intecept`
LA_AER.i<-filter(AER_Per,STATE=="LA")
hashV<-LA_AER.i$DATE[68]
#############LESS THAN 2*LA_MSE####################
SMALL.STATE.AER<-left_join(STATE.LOW.MSE.15[,1:2],AER_Per,by=c("State"="STATE"))
#SMALL.STATE.AER<-filter(SMALL.STATE.AER,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.AER,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_AER.i,colour="black")+ggtitle(label = "Art, Entertain and Recreation")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.AER$Chan),0),0,round(max(SMALL.STATE.AER$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.AER.15

SMALL.LA.AER.15

#@####################################
RESULT<- read_excel("New RESULT AF Permutattion.xlsx")
AF_Per<- read_excel("New Employee Gap AF Permutation.xlsx")

LA_AF.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_AF.Result$MSE_pre[1])

AF_Per$Chan<-AF_Per$AF-AF_Per$`sdid-intecept`
LA_AF.i<-filter(AF_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.AF<-left_join(STATE.LOW.MSE.15[,1:2],AF_Per,by=c("State"="STATE"))
#SMALL.STATE.AF<-filter(SMALL.STATE.AF,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.AF,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_AF.i,colour="black")+ggtitle(label = "Accomodation and \n Food Services")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.AF$Chan),0),0,round(max(SMALL.STATE.AF$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.AF.15

SMALL.LA.AF.15

RESULT<- read_excel("New RESULT ASW Permutattion.xlsx")
ASW_Per<- read_excel("New Employee Gap ASW Permutation.xlsx")


LA_ASW.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_ASW.Result$MSE_pre[1])

ASW_Per$Chan<-ASW_Per$ASW-ASW_Per$`sdid-intecept`
LA_ASW.i<-filter(ASW_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.ASW<-left_join(STATE.LOW.MSE.15[,1:2],ASW_Per,by=c("State"="STATE"))
#SMALL.STATE.ASW<-filter(SMALL.STATE.ASW,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.ASW,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_ASW.i,colour="black")+ggtitle(label = "ASW")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.ASW$Chan),0),0,round(max(SMALL.STATE.ASW$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.ASW.15

SMALL.LA.ASW.15

RESULT<- read_excel("New RESULT CON Permutattion.xlsx")
CON_Per<- read_excel("New Employee Gap CON Permutation.xlsx")


LA_CON.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_CON.Result$MSE_pre[1])

CON_Per$Chan<-CON_Per$CON-CON_Per$`sdid-intecept`
LA_CON.i<-filter(CON_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.CON<-left_join(STATE.LOW.MSE.15[,1:2],CON_Per,by=c("State"="STATE"))
#SMALL.STATE.CON<-filter(SMALL.STATE.CON,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.CON,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_CON.i,colour="black")+ggtitle(label = "Construction")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.CON$Chan),0),0,round(max(SMALL.STATE.CON$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.CON.15

SMALL.LA.CON.15

RESULT<- read_excel("New RESULT ES V2 Permutattion.xlsx")
ES_Per<- read_excel("New Employee Gap ES V2 Permutation.xlsx")


LA_ES.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_ES.Result$MSE_pre[1])

ES_Per$Chan<-ES_Per$ES-ES_Per$`sdid-intecept`
LA_ES.i<-filter(ES_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.ES<-left_join(STATE.LOW.MSE.15[,1:2],ES_Per,by=c("State"="STATE"))
#SMALL.STATE.ES<-filter(SMALL.STATE.ES,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.ES,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_ES.i,colour="black")+ggtitle(label = "Educational Services")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.ES$Chan),0),0,round(max(SMALL.STATE.ES$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.ES.15

SMALL.LA.ES.15

RESULT<- read_excel("New RESULT FI Permutattion.xlsx")
FI_Per<- read_excel("New Employee Gap FI Permutation.xlsx")


LA_FI.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_FI.Result$MSE_pre[1])

FI_Per$Chan<-FI_Per$FI-FI_Per$`sdid-intecept`
LA_FI.i<-filter(FI_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.FI<-left_join(STATE.LOW.MSE.15[,1:2],FI_Per,by=c("State"="STATE"))
#SMALL.STATE.FI<-filter(SMALL.STATE.FI,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.FI,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_FI.i,colour="black")+ggtitle(label = "Financial Insurance")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.FI$Chan),0),0,round(max(SMALL.STATE.FI$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.FI.15

SMALL.LA.FI.15

RESULT<- read_excel("New RESULT GOV Permutattion.xlsx")
GOV_Per<- read_excel("New Employee Gap GOV Permutation.xlsx")


LA_GOV.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_GOV.Result$MSE_pre[1])

GOV_Per$Chan<-GOV_Per$GOV-GOV_Per$`sdid-intecept`
LA_GOV.i<-filter(GOV_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.GOV<-left_join(STATE.LOW.MSE.15[,1:2],GOV_Per,by=c("State"="STATE"))
#SMALL.STATE.GOV<-filter(SMALL.STATE.GOV,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.GOV,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_GOV.i,colour="black")+ggtitle(label = "Government")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.GOV$Chan),0),0,round(max(SMALL.STATE.GOV$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.GOV.15

SMALL.LA.GOV.15

RESULT<- read_excel("New RESULT HCS Permutattion.xlsx")
HCS_Per<- read_excel("New Employee Gap HCS Permutation.xlsx")


LA_HCS.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_HCS.Result$MSE_pre[1])

HCS_Per$Chan<-HCS_Per$HCS-HCS_Per$`sdid-intecept`
LA_HCS.i<-filter(HCS_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.HCS<-left_join(STATE.LOW.MSE.15[,1:2],HCS_Per,by=c("State"="STATE"))
#SMALL.STATE.HCS<-filter(SMALL.STATE.HCS,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.HCS,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_HCS.i,colour="black")+ggtitle(label = "Health Care and \n Social Assistance")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.HCS$Chan),0),0,round(max(SMALL.STATE.HCS$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.HCS.15

SMALL.LA.HCS.15

#########
RESULT<- read_excel("New RESULT INF Permutattion.xlsx")
INF_Per<- read_excel("New Employee Gap INF Permutation.xlsx")


LA_INF.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_INF.Result$MSE_pre[1])

INF_Per$Chan<-INF_Per$INF-INF_Per$`sdid-intecept`
LA_INF.i<-filter(INF_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.INF<-left_join(STATE.LOW.MSE.15[,1:2],INF_Per,by=c("State"="STATE"))
SMALL.STATE.INF<-filter(SMALL.STATE.INF,State!="TX")
ggplot()+geom_line(data=SMALL.STATE.INF,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_INF.i,colour="black")+ggtitle(label = "Information")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.INF$Chan),0),0,round(max(SMALL.STATE.INF$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.INF.15

SMALL.LA.INF.15

RESULT<- read_excel("New RESULT MAN Permutattion.xlsx")
MAN_Per<- read_excel("New Employee Gap MAN Permutation.xlsx")


LA_MAN.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_MAN.Result$MSE_pre[1])

MAN_Per$Chan<-MAN_Per$MAN-MAN_Per$`sdid-intecept`
LA_MAN.i<-filter(MAN_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.MAN<-left_join(STATE.LOW.MSE.15[,1:2],MAN_Per,by=c("State"="STATE"))
#SMALL.STATE.MAN<-filter(SMALL.STATE.MAN,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.MAN,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_MAN.i,colour="black")+ggtitle(label = "Manufacturing")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.MAN$Chan),0),0,round(max(SMALL.STATE.MAN$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.MAN.15

SMALL.LA.MAN.15

RESULT<- read_excel("New RESULT MCE Permutattion.xlsx")
MCE_Per<- read_excel("New Employee Gap MCE Permutation.xlsx")


LA_MCE.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_MCE.Result$MSE_pre[1])

MCE_Per$Chan<-MCE_Per$MCE-MCE_Per$`sdid-intecept`
LA_MCE.i<-filter(MCE_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.MCE<-left_join(STATE.LOW.MSE.15[,1:2],MCE_Per,by=c("State"="STATE"))
#SMALL.STATE.MCE<-filter(SMALL.STATE.MCE,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.MCE,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_MCE.i,colour="black")+ggtitle(label = "Management of Companies \n and Enterprises")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.MCE$Chan),0),0,round(max(SMALL.STATE.MCE$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.MCE.15

SMALL.LA.MCE.15

RESULT<- read_excel("New RESULT RE Permutattion.xlsx")
RE_Per<- read_excel("New Employee Gap RE Permutation.xlsx")


LA_RE.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_RE.Result$MSE_pre[1])

RE_Per$Chan<-RE_Per$RE-RE_Per$`sdid-intecept`
LA_RE.i<-filter(RE_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.RE<-left_join(STATE.LOW.MSE.15[,1:2],RE_Per,by=c("State"="STATE"))
#SMALL.STATE.RE<-filter(SMALL.STATE.RE,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.RE,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_RE.i,colour="black")+ggtitle(label = "Real Estate and \n Rental and Leasing")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.RE$Chan),0),0,round(max(SMALL.STATE.RE$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.RE.15

SMALL.LA.RE.15

RESULT<- read_excel("New RESULT RT Permutattion.xlsx")
RT_Per<- read_excel("New Employee Gap RT Permutation.xlsx")


LA_RT.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_RT.Result$MSE_pre[1])

RT_Per$Chan<-RT_Per$RT-RT_Per$`sdid-intecept`
LA_RT.i<-filter(RT_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.RT<-left_join(STATE.LOW.MSE.15[,1:2],RT_Per,by=c("State"="STATE"))
#SMALL.STATE.RT<-filter(SMALL.STATE.RT,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.RT,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_RT.i,colour="black")+ggtitle(label = "Retail Trade")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.RT$Chan),0),0,round(max(SMALL.STATE.RT$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.RT.15

SMALL.LA.RT.15

RESULT<- read_excel("New RESULT OS Permutattion.xlsx")
OS_Per<- read_excel("New Employee Gap OS Permutation.xlsx")


LA_OS.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_OS.Result$MSE_pre[1])

OS_Per$Chan<-OS_Per$OS-OS_Per$`sdid-intecept`
LA_OS.i<-filter(OS_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.OS<-left_join(STATE.LOW.MSE.15[,1:2],OS_Per,by=c("State"="STATE"))
SMALL.STATE.OS<-SMALL.STATE.OS%>%filter(State!="GA")
#SMALL.STATE.OS<-filter(SMALL.STATE.OS,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.OS,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_OS.i,colour="black")+ggtitle(label = "Other Services")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.OS$Chan),0),0,round(max(SMALL.STATE.OS$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.OS.15

SMALL.LA.OS.15

RESULT<- read_excel("New RESULT SPS Permutattion.xlsx")
SPS_Per<- read_excel("New Employee Gap SPS Permutation.xlsx")


LA_SPS.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_SPS.Result$MSE_pre[1])

SPS_Per$Chan<-SPS_Per$SPS-SPS_Per$`sdid-intecept`
LA_SPS.i<-filter(SPS_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.SPS<-left_join(STATE.LOW.MSE.15[,1:2],SPS_Per,by=c("State"="STATE"))
#SMALL.STATE.SPS<-filter(SMALL.STATE.SPS,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.SPS,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_SPS.i,colour="black")+ggtitle(label = "Professional, Scientific, \n and Technical Services")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.SPS$Chan),0),0,round(max(SMALL.STATE.SPS$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.SPS.15

SMALL.LA.SPS.15

RESULT<- read_excel("New RESULT TWU Permutattion.xlsx")
TWU_Per<- read_excel("New Employee Gap TWU Permutation.xlsx")


LA_TWU.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_TWU.Result$MSE_pre[1])

TWU_Per$Chan<-TWU_Per$TWU-TWU_Per$`sdid-intecept`
LA_TWU.i<-filter(TWU_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.TWU<-left_join(STATE.LOW.MSE.15[,1:2],TWU_Per,by=c("State"="STATE"))
#SMALL.STATE.TWU<-filter(SMALL.STATE.TWU,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.TWU,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_TWU.i,colour="black")+ggtitle(label = "Transportation, Warehousing, \n and Utilities")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.TWU$Chan),0),0,round(max(SMALL.STATE.TWU$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.TWU.15

SMALL.LA.TWU.15

RESULT<- read_excel("New RESULT WT Permutattion.xlsx")
WT_Per<- read_excel("New Employee Gap WT Permutation.xlsx")


LA_WT.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_WT.Result$MSE_pre[1])

WT_Per$Chan<-WT_Per$WT-WT_Per$`sdid-intecept`
LA_WT.i<-filter(WT_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.WT<-left_join(STATE.LOW.MSE.15[,1:2],WT_Per,by=c("State"="STATE"))
#SMALL.STATE.WT<-filter(SMALL.STATE.WT,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.WT,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_WT.i,colour="black")+ggtitle(label = "Wholesale Trade")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.WT$Chan),0),0,round(max(SMALL.STATE.WT$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.WT.15

SMALL.LA.WT.15

RESULT<- read_excel("New RESULT TNF Permutattion.xlsx")
TNF_Per<- read_excel("New Employee Gap TNF Permutation.xlsx")


LA_TNF.Result<-filter(RESULT,State=="LA")

STATE.LOW.MSE.15<-filter(RESULT,MSE_pre<2*LA_TNF.Result$MSE_pre[1])

TNF_Per$Chan<-TNF_Per$TNF-TNF_Per$`sdid-intecept`
LA_TNF.i<-filter(TNF_Per,STATE=="LA")

#############LESS THAN 2*LA_MSE####################
SMALL.STATE.TNF<-left_join(STATE.LOW.MSE.15[,1:2],TNF_Per,by=c("State"="STATE"))
#SMALL.STATE.TNF<-filter(SMALL.STATE.TNF,STATE!="VA")
ggplot()+geom_line(data=SMALL.STATE.TNF,aes(x=DATE,y=Chan,group=State),colour="grey")+
  geom_line(aes(x=DATE,y=Chan),data = LA_TNF.i,colour="black")+ggtitle(label = "Total Non-farm")+
  theme_bw()+geom_vline(xintercept = hashV,linetype=2)+xlab("")+
  scale_y_continuous(breaks = c(round(min(SMALL.STATE.TNF$Chan),0),0,round(max(SMALL.STATE.TNF$Chan),0)))+
  theme(plot.title = element_text(h=0.5,size = 7),axis.text = element_text(size =5))+ylab("")->SMALL.LA.TNF.15

SMALL.LA.TNF.15

plot2<-ggarrange(SMALL.LA.TNF.15,SMALL.LA.GOV.15,SMALL.LA.HCS.15,
                 SMALL.LA.AF.15,SMALL.LA.RT.15,SMALL.LA.CON.15,
                 SMALL.LA.OS.15,SMALL.LA.ES.15,SMALL.LA.MAN.15,
                 SMALL.LA.ASW.15,SMALL.LA.AER.15,SMALL.LA.TWU.15,
                 SMALL.LA.WT.15,SMALL.LA.FI.15,SMALL.LA.INF.15,
                 SMALL.LA.RE.15,SMALL.LA.MCE.15,SMALL.LA.SPS.15,
                 nrow = 6,ncol = 3,legend = "bottom",common.legend = TRUE)%>%
  annotate_figure(left = "Gap in Employees",bottom = "Year")
plot2