Import Dataset

RENT.merge<-read_xlsx("MSA-RENT merge All.xlsx")
RENT.merge$treat<-ifelse(RENT.merge$state=="LA",1,0)

## Cleaning Dataset
colnames(RENT.merge)
##  [1] "FirstNAME"           "AREANAME"            "RENT_0"             
##  [4] "RENT_1"              "RENT_2"              "RENT_3"             
##  [7] "RENT_4"              "YEAR"                "NAME.x"             
## [10] "state"               "Unemployee.Rate"     "Personal.Income"    
## [13] "Resident.Population" "nyear"               "MSA"                
## [16] "MSA.Code"            "Price"               "Change"             
## [19] "NAME.y"              "treat"
# Remove NA
RENT.merge<-RENT.merge%>%
  group_by(MSA)%>%
  filter(!any(is.na(Unemployee.Rate)))

# ADD STATE NUM
statepop<-usmap::statepop[,1:2]
statepop$fips<-as.numeric(statepop$fips)

RENT.merge<-left_join(RENT.merge,statepop,by=c("state"="abbr"))

RENT.merge<-data.frame(RENT.merge)

Ballace Dataset

MSA<-RENT.merge%>%
  group_by(MSA.Code)%>%
  mutate(nyear=n())%>%
  filter(nyear==15)

MSA<-data.frame(MSA)

## NEW ORLEAN AS SAMPLE
LAst<-MSA%>%filter(state=="LA")
tst<-unique(LAst$MSA.Code)

stc<-unique(MSA $MSA.Code)
stc<-stc[!stc %in% tst] #exclude LA MSA from control unit

Single Treat

RENT 0

## Single Treated Unit (New Orleans)
Sn.RENT<-dataprep(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_0",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.identifier = tst[7],
  controls.identifier = stc,
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010)


synth.out <- synth(Sn.RENT)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 23258.96 
## 
## solution.v:
##  0.70716 8.14214e-05 0.2927586 
## 
## solution.w:
##  0.004702204 0.005348505 0.005142084 0.00495638 0.00503035 0.004460289 0.005293799 0.003512611 0.005051193 0.004813741 0.004351338 0.006160995 0.005070426 0.007375852 0.005382862 0.005455046 0.003899665 0.004940167 0.004836046 0.002836279 0.00456957 0.004644611 0.004425684 0.005329566 0.005481628 0.00368797 0.004335881 0.004290167 0.005139884 0.002684394 0.004169367 0.00842739 0.005924325 0.005123986 0.003756742 0.00523249 0.005291268 0.005418116 0.004791266 0.00689265 0.005232446 0.005658373 0.005559334 0.003817832 0.006946436 0.004648434 0.004219484 0.004341585 0.004705914 0.004581162 0.005228971 0.006429469 0.005361135 0.005878718 0.005533043 0.006179245 0.006381879 0.00575227 0.004817819 0.008310957 0.005375702 0.003713167 0.004608376 0.005305718 0.004748386 0.00439044 0.004909513 0.004682235 0.005499947 0.004723591 0.004906756 0.006766574 0.004460096 0.004925236 0.000975167 0.00571352 0.00497619 0.005176244 0.004478262 0.005358316 0.00521294 0.005670328 0.005046066 0.004905173 0.005536107 0.005159261 0.004590969 0.005428714 0.004026411 0.005765547 0.005433453 0.004126849 0.004309113 0.004467527 0.005463648 0.003216947 0.005298759 0.004512605 0.004710606 0.003036958 0.005691125 0.005797999 0.00809181 0.005864985 0.005313941 0.00419707 0.005456335 0.007093997 0.00487376 0.005302761 0.005311648 0.04293147 0.004699616 0.03753674 0.004526866 0.005172198 0.00466332 0.005267011 0.004821857 0.005152612 0.004334212 0.00441674 0.004935892 0.005745176 0.006006906 0.005675426 0.004798784 0.00484513 0.005737492 0.004440246 0.005350914 0.003032857 0.004980649 0.005906544 0.004096714 0.004353855 0.004153109 0.00375286 0.005040436 0.005789652 0.006319598 0.005414441 0.004474496 0.005844307 0.006530579 0.003937808 0.004399361 0.004344272 0.00536453 0.004853527 0.005957476 0.004533423 0.00460082 0.004304067 0.006741179 0.006357501 0.004981567 0.003827393 0.005476422 0.005705158 0.004851157 0.00385126 0.004984812 0.00475484 0.00478059 0.004953829 0.004913334 0.004797277 0.005065187 0.004401179 0.005211274 0.004816699 0.005205808 0.005044565 0.006963431 0.004521554 0.005905931 0.007603014 0.0288129
#round(synth.out$solution.w,2)

synth.tables <- synth.tab(
  dataprep.res = Sn.RENT,
  synth.res = synth.out)

#print(synth.tables)


## plot in levels (treated and synthetic)
path.plot(dataprep.res = Sn.RENT,synth.res = synth.out)##+ggtitle(label = "RENT_0")

## plot the gaps (treated - synthetic)
gaps.plot(dataprep.res = Sn.RENT,synth.res = synth.out)##+ggtitle(label = "RENT_0")

RENT 1

## Single Treated Unit (New Orleans)
Sn.RENT<-dataprep(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_1",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.identifier = tst[7],
  controls.identifier = stc,
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010)


synth.out <- synth(Sn.RENT)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 27947.93 
## 
## solution.v:
##  0.9759974 0.02240637 0.001596254 
## 
## solution.w:
##  0.004043436 0.004919076 0.004310995 0.004422649 0.004487857 0.003915032 0.004867071 0.003124705 0.004302187 0.004278725 0.003680677 0.005342137 0.00465929 0.006388638 0.00451407 0.004962669 0.003519103 0.004368609 0.004295623 0.003168269 0.003876205 0.004158519 0.003417971 0.004990808 0.005010572 0.003483783 0.003927873 0.003849049 0.004628851 0.003120144 0.003812347 0.008618656 0.005324375 0.004690369 0.00345561 0.004744002 0.004717245 0.004896599 0.004394921 0.006343597 0.00458141 0.005335582 0.004792513 0.003490153 0.006403731 0.004061774 0.003773287 0.003846083 0.004224711 0.004083896 0.004631729 0.004265769 0.004826707 0.005411181 0.004906147 0.005673462 0.005762988 0.004892043 0.00435182 0.007377248 0.004420941 0.003232139 0.004045099 0.004607017 0.004247877 0.00388156 0.004268574 0.004256475 0.004920998 0.004203721 0.003885323 0.00616194 0.004010767 0.004289802 0.0030871 0.005125223 0.004448486 0.004468127 0.003911626 0.004854472 0.004768053 0.005065104 0.004062921 0.004181309 0.005029216 0.004611875 0.004036757 0.005009586 0.003646051 0.08493611 0.003962177 0.003611729 0.003682293 0.004021079 0.004880431 0.003302742 0.004734312 0.003859145 0.004120698 0.00306791 0.005120725 0.005367554 0.006477971 0.004886453 0.00471245 0.003676651 0.004596388 0.00647808 0.004383203 0.004659711 0.004678296 0.06449203 0.004084531 0.03940878 0.003788012 0.004290846 0.004099867 0.004919463 0.004177606 0.004574288 0.003878903 0.003849124 0.004481003 0.005131119 0.004489067 0.005069142 0.003874521 0.002795439 0.005023304 0.003913736 0.005010994 0.003253175 0.004558656 0.005479363 0.00332585 0.003729976 0.003753137 0.003515316 0.004522153 0.005368078 0.005735332 0.004792498 0.003984877 0.005188595 0.006296548 0.003604951 0.003945998 0.003958074 0.004681386 0.004385024 0.005448369 0.004123984 0.004034312 0.003818733 0.006256683 0.005122373 0.004481857 0.003465852 0.004722542 0.00528651 0.004403971 0.001654048 0.004406103 0.004223524 0.004088485 0.004538522 0.004287705 0.00435406 0.00431901 0.003980402 0.004774877 0.004325147 0.004624664 0.00459618 0.005995086 0.004080199 0.005391845 0.006816635 0.02526876
#round(synth.out$solution.w,2)

synth.tables <- synth.tab(
  dataprep.res = Sn.RENT,
  synth.res = synth.out)

#print(synth.tables)


## plot in levels (treated and synthetic)
path.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_1")

## plot the gaps (treated - synthetic)
gaps.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_1")

RENT 2

## Single Treated Unit (New Orleans)
Sn.RENT<-dataprep(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_2",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.identifier = tst[7],
  controls.identifier = stc,
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010)


synth.out <- synth(Sn.RENT)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 36333.21 
## 
## solution.v:
##  0.07283353 0.926873 0.0002934828 
## 
## solution.w:
##  0.004372638 0.005753715 0.004441766 0.004897253 0.004810293 0.004457729 0.008085905 0.005929455 0.004475573 0.004726749 0.004139469 0.006171928 0.005436366 0.006325838 0.006581492 0.005235799 0.004389966 0.004685529 0.005311963 0.004381017 0.004238511 0.004924666 0.007887235 0.006429127 0.005339855 0.005288003 0.005065298 0.004688026 0.00497711 0.005306528 0.005303592 0.00839709 0.005376829 0.005637457 0.004430014 0.005199773 0.005527534 0.005119629 0.005313563 0.006532433 0.004728724 0.006229205 0.007267231 0.005250485 0.007346494 0.004472834 0.004556365 0.004490274 0.004808745 0.004679763 0.004826322 0.004735387 0.005047028 0.005663923 0.004959092 0.005827634 0.005851389 0.004884317 0.005060165 0.008399643 0.004518791 0.004008915 0.004499364 0.004716315 0.004758706 0.004487628 0.004526313 0.005298007 0.005056304 0.00470107 0.004149006 0.006667617 0.004933972 0.005548657 0.004651671 0.00521505 0.004860439 0.004611906 0.005097462 0.005131968 0.005242235 0.005147041 0.004267149 0.004404239 0.005259428 0.00488081 0.004584777 0.005475881 0.004868927 0.004133741 0.004302517 0.004266874 0.004183252 0.005107077 0.005025966 0.004762567 0.004934297 0.004261461 0.004505348 0.005497389 0.005237849 0.005733616 0.00712192 0.005578619 0.006497999 0.004311299 0.004581869 0.006840104 0.004924951 0.004795744 0.004805212 0.006995037 0.005388968 0.04129088 0.00414198 0.004425477 0.00487398 0.006214011 0.004565676 0.004809357 0.004641849 0.004389353 0.005154656 0.005132507 0.004752996 0.005866778 0.004153976 0.003725013 0.005033237 0.004484665 0.006139057 0.004552124 0.005505371 0.005852279 0.006602461 0.005602562 0.004792886 0.005174601 0.005311219 0.005772966 0.005867312 0.006064949 0.004630413 0.00516092 0.008905566 0.005470013 0.004791853 0.00515018 0.004781255 0.00500984 0.005587156 0.005310052 0.004506415 0.004500627 0.006635739 0.005191455 0.0050511 0.004386136 0.004764021 0.005816891 0.005080726 0.008627976 0.004725471 0.004932105 0.004366394 0.00530389 0.004551153 0.005015676 0.004470951 0.004876161 0.005544782 0.004834922 0.004839409 0.005193628 0.006057704 0.005211078 0.00549697 0.007660971 0.03262516
#round(synth.out$solution.w,2)

synth.tables <- synth.tab(
  dataprep.res = Sn.RENT,
  synth.res = synth.out)

#print(synth.tables)


## plot in levels (treated and synthetic)
path.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_2")

## plot the gaps (treated - synthetic)
gaps.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_2")

RENT 3

## Single Treated Unit (New Orleans)
Sn.RENT<-dataprep(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_3",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.identifier = tst[7],
  controls.identifier = stc,
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010)


synth.out <- synth(Sn.RENT)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 50774.02 
## 
## solution.v:
##  0.0927801 0.9049402 0.002279723 
## 
## solution.w:
##  0.004245706 0.005239802 0.004199634 0.004735109 0.004537008 0.004381002 0.006326346 0.005844937 0.004246385 0.004566739 0.004087801 0.006311492 0.005042842 0.004739046 0.006425662 0.004728551 0.004341993 0.004475879 0.005201875 0.004444877 0.004150223 0.004810721 0.006885078 0.005563083 0.004832154 0.005195585 0.004966182 0.004620858 0.004665308 0.00505716 0.005184382 0.007821997 0.004655006 0.005233732 0.004370423 0.004872056 0.0053219 0.004693898 0.005020258 0.006259282 0.004410845 0.005253207 0.006556785 0.005234307 0.00628451 0.004345406 0.004494512 0.00441198 0.004634128 0.004555498 0.004482394 0.004132968 0.004639315 0.004872544 0.004522797 0.004866838 0.004761011 0.004366758 0.004857879 0.005225072 0.004193011 0.003969444 0.004377239 0.004373947 0.004574838 0.004401208 0.004340341 0.005084897 0.004578658 0.004546924 0.00399527 0.006259384 0.004839557 0.005505845 0.0535813 0.004616214 0.004654622 0.004326689 0.005157923 0.004684493 0.004820748 0.004582459 0.004066794 0.004227687 0.004703205 0.004586689 0.004531751 0.004894065 0.004857257 0.003794101 0.004009546 0.004220291 0.004127517 0.005006403 0.004560812 0.004643415 0.004560726 0.004190911 0.004373702 0.005389204 0.00463464 0.004922692 0.004783311 0.007206597 0.005986498 0.004258551 0.004258844 0.005000417 0.004716807 0.004438895 0.004457056 0.007485989 0.005405985 0.03808638 0.004078177 0.004173119 0.004872607 0.005469021 0.004674659 0.004495809 0.004563183 0.004349455 0.004891074 0.005254879 0.004191073 0.005568434 0.004017675 0.00364465 0.004479022 0.004399192 0.005374215 0.00436945 0.005157041 0.004944083 0.006364001 0.005661941 0.004746018 0.005103236 0.005110758 0.004976353 0.004783779 0.005752904 0.004531352 0.004563636 0.005849296 0.005372395 0.00471306 0.005019127 0.004407475 0.004789592 0.004811544 0.005126151 0.004419807 0.004432881 0.005071755 0.004377222 0.004838498 0.004357883 0.00436683 0.005107034 0.004834796 0.007570796 0.004596733 0.004849441 0.004227334 0.004971777 0.004372597 0.004778977 0.004252392 0.004763147 0.005127263 0.004625507 0.004504361 0.004871042 0.004670347 0.005079162 0.004802254 0.005065668 0.05335258
#round(synth.out$solution.w,2)

synth.tables <- synth.tab(
  dataprep.res = Sn.RENT,
  synth.res = synth.out)

#print(synth.tables)


## plot in levels (treated and synthetic)
path.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_3")

## plot the gaps (treated - synthetic)
gaps.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_3")

RENT 4

## Single Treated Unit (New Orleans)
Sn.RENT<-dataprep(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_4",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.identifier = tst[7],
  controls.identifier = stc,
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010)


synth.out <- synth(Sn.RENT)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 48378.91 
## 
## solution.v:
##  0.09505597 0.9026275 0.002316487 
## 
## solution.w:
##  0.004248656 0.005202731 0.004194679 0.00473702 0.004526961 0.004384855 0.006103014 0.005793594 0.00424198 0.004566981 0.004092762 0.00636938 0.005017469 0.004573535 0.006424052 0.004694908 0.004329206 0.00447229 0.005205899 0.004196434 0.004155544 0.004812397 0.006719719 0.005478753 0.004798663 0.005165969 0.004961338 0.004620483 0.004651894 0.004934128 0.005170751 0.007746231 0.004598813 0.005206979 0.004347074 0.004857606 0.005322261 0.004669906 0.00500252 0.006269037 0.00439791 0.005161101 0.006480482 0.005211978 0.006180651 0.004347244 0.004493403 0.004412904 0.004630662 0.004555857 0.004466284 0.004093279 0.00461691 0.00480726 0.004498629 0.00478201 0.004660327 0.004334202 0.004852231 0.004804762 0.004180309 0.003919272 0.004378918 0.004358807 0.004571197 0.004402459 0.004339278 0.005074163 0.00454912 0.004546418 0.003997981 0.006248572 0.004839226 0.00551814 0.0574165 0.004573685 0.004651737 0.004317028 0.005172715 0.004657168 0.004794679 0.004543776 0.004065639 0.004227735 0.004664352 0.004575744 0.00454046 0.004850703 0.004850054 0.003781426 0.004000894 0.00421875 0.004130955 0.005004396 0.004532438 0.004556005 0.004541801 0.004197057 0.004376019 0.00526734 0.004591384 0.004854178 0.004505085 0.007438714 0.005942667 0.004258703 0.004247387 0.004798258 0.004711904 0.004422014 0.004441339 0.007794733 0.005420541 0.03812464 0.004085565 0.004167227 0.004887555 0.005400158 0.004707681 0.004482483 0.004563135 0.004356314 0.004879948 0.005306695 0.004154244 0.005562243 0.004021082 0.003654932 0.004442049 0.004401621 0.005304789 0.004251706 0.005135143 0.004864001 0.006310477 0.005666472 0.004742484 0.005078133 0.005108201 0.004909516 0.004683682 0.005739345 0.004532492 0.004522334 0.005446487 0.005350586 0.004713736 0.00501068 0.004389154 0.004782682 0.00474892 0.005115343 0.004425253 0.004433828 0.004908084 0.004311285 0.004834435 0.004338294 0.004346696 0.005050132 0.004824622 0.007290874 0.004603413 0.004856877 0.004230078 0.004952361 0.004372444 0.004769232 0.00424943 0.004759928 0.005100684 0.004619813 0.00448906 0.004854547 0.004531734 0.005074382 0.004749483 0.004747405 0.05515731
#round(synth.out$solution.w,2)

synth.tables <- synth.tab(
  dataprep.res = Sn.RENT,
  synth.res = synth.out)

#print(synth.tables)


## plot in levels (treated and synthetic)
path.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_4")

## plot the gaps (treated - synthetic)
gaps.plot(dataprep.res = Sn.RENT,synth.res = synth.out)#+ggtitle(label = "RENT_4")

Multiple Treated MSA

RENT0

## Multiple Unit treated (LA MSA)
Mu.RENT<-multiple.synth(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_0",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.time = 2005,
  treated.units = tst,
  control.units = sample(stc,length(stc)*0.2,replace = F), #NOTE I Sampling because its took lot of time
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010,
  special.predictors = list(
    list("RENT_0", 2005, "mean")
  )
  )
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 280.8545 
## 
## solution.v:
##  0.7182821 0.0001666766 0.2734129 0.008138361 
## 
## solution.w:
##  0.0004933471 0.008701194 0.0006409282 0.000781483 0.1841566 0.001827854 0.0002891714 0.0007164364 0.0004381889 0.0004879945 0.001730691 0.001757019 0.002309542 0.002145619 0.5788063 0.005106147 1.97478e-05 0.001651147 0.0006970723 0.001445273 0.002980773 0.001532107 0.0006954386 0.003440097 0.0005400062 0.001110846 0.0008027119 0.0007499717 0.001610649 0.001236701 0.001253201 0.0019919 0.0008599826 0.0008018436 0.1861921 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8942.505 
## 
## solution.v:
##  0.2516817 0.6739572 0.03929728 0.03506387 
## 
## solution.w:
##  0.009655436 0.2068048 0.01102248 0.01848358 0.04383993 0.02712421 0.007291243 0.01701038 0.009989466 0.01048336 0.09965557 0.02192077 0.0355083 0.02186474 0.03392578 0.02689606 0.03181943 0.0261974 0.02119168 0.02716088 0.02424785 0.007339492 0.01972409 0.01910025 0.01295576 0.0207001 0.01359342 0.01242393 0.01816966 0.01945924 0.02340062 0.02639808 0.02055236 0.02043287 0.03365679 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3373.123 
## 
## solution.v:
##  0.04369802 0.1541063 0.6241224 0.1780732 
## 
## solution.w:
##  0.0008149708 0.00134689 0.001108946 0.002008967 0.007584823 0.004166605 0.0005356997 0.00147902 0.0007749518 0.0008206014 0.3037398 0.1664009 0.004998267 1.7013e-06 0.01422122 0.004079463 0.3690043 0.004177848 0.004203981 0.01133737 0.004697336 0.001246112 0.002143758 0.002484987 0.001104703 0.05885277 0.001940372 0.001325883 0.004623075 0.005139624 0.001886618 0.004498123 0.002613041 0.002512603 0.002124623 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1170.068 
## 
## solution.v:
##  0.4968798 0.3248243 0.08473126 0.09356456 
## 
## solution.w:
##  0.002262482 2.6635e-06 0.003043434 0.005987177 0.05110913 0.0103399 0.001187185 0.004523492 0.001967332 0.001960551 0.1152118 0.01393938 0.01093411 0.01226342 0.5393982 0.01371818 0.0392403 0.009921118 0.009728804 0.01502389 0.01076346 0.004110146 0.006406515 0.00899665 0.003069748 0.03634172 0.005179363 0.003507756 0.01481758 0.01052621 0.005899229 0.01217356 0.006705202 0.006983881 0.002756446 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 307.0829 
## 
## solution.v:
##  0.6744643 0.04613367 0.2433032 0.03609878 
## 
## solution.w:
##  0.001060482 0.01431255 0.001461077 0.00191584 8.1852e-06 0.003359528 0.0005838184 0.00161806 0.0009146538 0.001002408 0.1798218 0.005697529 0.001729022 0.003913931 0.3093045 0.0102881 0.2309356 0.003400476 0.002089993 0.002294317 0.005751831 0.004818466 0.001539569 0.008238352 0.001205388 0.0006849304 0.002220851 0.001793743 0.009775601 0.003934811 0.002572934 0.003529934 0.002119651 0.001939583 0.1741624 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 226.2438 
## 
## solution.v:
##  0.2621621 4.51076e-05 0.5010465 0.2367463 
## 
## solution.w:
##  0.0005899738 6.54105e-05 0.0009346705 0.001757884 0.0001515964 0.003862686 0.000411292 0.001263386 0.0005930258 0.0006361151 0.4068148 0.003473765 0.01045579 0.003111482 0.3299905 0.004689732 0.06751007 0.003385175 0.003049993 0.004813403 0.003271636 0.001895031 0.001802294 0.002719688 0.0008394776 0.002876698 0.0014935 0.001001066 0.003235305 0.00282197 0.001934773 0.004708718 0.001912752 0.002042922 0.1198834 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18272.88 
## 
## solution.v:
##  0.1915898 2e-10 0.7737333 0.03467687 
## 
## solution.w:
##  1.63744e-05 0.1444567 0.02269661 0.02004108 0.01780617 0.02146776 0.02713117 0.02063153 0.02442731 0.02675906 0.01879366 0.02082519 0.02135765 0.02230134 0.0214968 0.02235267 0.02084275 0.0216783 0.01865144 0.01999823 0.02376124 0.02207048 0.01899292 0.02434921 0.02110427 0.0209242 0.02101671 0.1597143 0.02002599 0.02061403 0.02322472 0.02056597 0.02070106 0.01979072 0.0294124
Mu.RENT$p+
  scale_x_continuous(breaks = c(2002, 2005, 2007, 2010), 
                     labels = c(2002, 2005, 2007, 2010))

RENT1

## Multiple Unit treated (LA MSA)
Mu.RENT<-multiple.synth(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_1",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.time = 2005,
  treated.units = tst,
  control.units = sample(stc,length(stc)*0.2,replace = F), #NOTE I Sampling because its took lot of time
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010,
  special.predictors = list(
    list("RENT_1", 2005, "mean")
  )
  )
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 530.099 
## 
## solution.v:
##  0.06300765 0.3831055 0.5481434 0.005743473 
## 
## solution.w:
##  0.001644106 0.003882468 0.001891946 0.001583958 0.002922628 0.001629504 0.002695199 0.0008368012 0.003805412 0.002334368 0.001173468 0.7733476 0.002650475 0.003304409 0.01499137 0.001396237 0.003243002 0.001396979 0.005215602 0.002862662 0.002855156 0.002112928 0.001109536 0.001275608 0.002452475 0.001855088 0.002357046 5.0628e-06 0.001344806 3.68571e-05 0.00199459 0.001713796 0.006239108 0.005981816 0.1358579 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8385.014 
## 
## solution.v:
##  0.07426333 0.4465508 0.4787183 0.0004675943 
## 
## solution.w:
##  0.0410772 0.03020354 0.01068382 0.01196682 0.01746131 0.008482262 0.02074938 0.02680329 0.02381482 0.02360221 0.01726115 0.04525758 0.02197286 0.02449895 0.167115 0.02548775 0.02478976 0.02578388 0.0316237 0.02456251 0.02852328 0.006360779 0.01637067 0.018743 0.009912128 0.0128711 0.01798958 0.02722542 0.01316698 0.1585527 0.02141412 0.007342804 0.02078865 0.01753331 7.7391e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 572.3659 
## 
## solution.v:
##  0.3985334 0.5116693 0.05855646 0.03124086 
## 
## solution.w:
##  0.5714605 3.2217e-06 3.3895e-06 5.5669e-06 9.485e-06 2.7812e-06 5.3608e-06 1.40589e-05 7.787e-07 1.13833e-05 1.3715e-05 0.4266009 1.13177e-05 1.74278e-05 5.16251e-05 4.066e-07 1.34592e-05 3.9542e-06 6.22523e-05 9.9263e-06 2.42446e-05 2.2563e-06 2.6752e-06 1.3127e-05 3.7973e-06 4.4698e-06 8.3918e-06 2.87667e-05 4.5279e-06 0.001576525 9.793e-07 2.3905e-06 1.17154e-05 9.9149e-06 4.6487e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2881.6 
## 
## solution.v:
##  0.0003762763 0.02362709 0.04219885 0.9337978 
## 
## solution.w:
##  0.2828276 0.0005901693 0.002523368 0.00299442 0.004661183 0.001790372 0.005113965 0.00332397 0.003142626 0.003465203 0.004101042 0.4499487 0.002858983 0.002900447 4.4718e-06 0.108726 0.003855605 0.001749284 0.0007560045 0.004707304 0.002747511 0.002040616 0.002810809 0.005284926 0.002650147 0.003184758 0.004398179 0.002013725 0.002357319 1.34696e-05 0.005911583 0.001714623 0.002306762 0.003829774 0.06869505 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 332.0045 
## 
## solution.v:
##  0.02494004 0.03139107 0.02328087 0.920388 
## 
## solution.w:
##  0.07305603 9.1854e-06 0.002003116 0.002083659 0.003567654 0.001413557 0.004416879 0.00174801 0.001456665 0.004878197 0.002478606 0.2649724 0.004515762 0.004494116 0.0008009619 0.1182625 0.003861449 6.1526e-06 0.001302571 0.004776412 0.004979069 0.001332934 0.001052266 0.003546072 0.002005768 0.002461112 0.003757369 0.003406071 0.002026749 0.4651141 0.004178395 0.001244639 0.001752102 0.003039448 1.24e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 352.7111 
## 
## solution.v:
##  0.9464515 0.03788302 7.137e-07 0.01566473 
## 
## solution.w:
##  0.4024363 2.91975e-05 1.4019e-06 1.3804e-06 1.9567e-06 1.1919e-06 2.7081e-06 1.2637e-06 7.5997e-06 2.1575e-06 1.4606e-06 0.3691786 1.8115e-06 1.801e-06 1.4312e-06 7.758e-06 4.0804e-06 2.8739e-06 5.1339e-06 3.539e-06 2.426e-06 1.1327e-06 1.6686e-06 1.7377e-06 1.3696e-06 1.5207e-06 1.8853e-06 1.655e-06 1.3803e-06 0.2282821 2.9278e-06 1.1308e-06 3.2128e-06 2.212e-06 2.6e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 24128.26 
## 
## solution.v:
##  0.9416868 0.04301072 0 0.01530249 
## 
## solution.w:
##  0.03959826 0.02148643 0.02216454 0.02237567 0.02235674 0.02163254 0.02315393 0.02307302 0.0200909 0.02752832 0.02363003 0.0193993 0.02708351 0.02670075 0.02581759 0.07679301 0.02326871 0.03946205 0.02480042 0.02426777 0.0275618 0.01942979 0.06180347 0.02630118 0.02134927 0.02287668 0.02374348 0.02654011 0.02523993 0.03502509 0.0248099 0.02068238 0.02119807 0.02144375 0.06731161
Mu.RENT$p+
  scale_x_continuous(breaks = c(2002, 2005, 2007, 2010), 
                     labels = c(2002, 2005, 2007, 2010))

RENT2

## Multiple Unit treated (LA MSA)
Mu.RENT<-multiple.synth(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_2",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.time = 2005,
  treated.units = tst,
  control.units = sample(stc,length(stc)*0.2,replace = F), #NOTE I Sampling because its took lot of time
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010,
  special.predictors = list(
    list("RENT_2", 2005, "mean")
  )
  )
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 50.00395 
## 
## solution.v:
##  0.654609 0.0005120788 0.01042595 0.334453 
## 
## solution.w:
##  0.0006711241 0.0005976111 0.6350366 0.001642781 0.002290921 0.002144289 0.0008973319 0.002074649 0.2251063 0.001691005 0.0001019868 0.001648218 0.001026285 0.002336885 0.001703102 0.002333999 0.002192713 0.002220547 0.002009579 0.002303195 0.002386852 0.0007616249 0.001628679 0.002121587 0.002172973 0.002325563 0.002308705 0.001357131 0.001282026 0.002282247 0.001761261 0.002314695 0.00220769 0.00226462 0.08279528 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8489.671 
## 
## solution.v:
##  0.03187191 0.0005161838 0.7130555 0.2545564 
## 
## solution.w:
##  0.02538932 0.0445722 0.1358568 0.006265745 0.01333772 0.003786932 0.00367761 0.007306063 0.1660128 0.05356341 0.009799179 0.02008987 0.0147951 0.01375864 0.02356607 0.01859415 0.01524159 0.01245514 0.01750755 0.009913428 0.003859131 0.02375748 0.1615535 0.01266833 0.01035724 0.007718156 0.01100783 0.007147476 0.01223898 0.01239651 0.0009083764 0.01297734 0.01238015 0.007315253 0.08822484 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 281.1092 
## 
## solution.v:
##  0.001733044 0.1033061 1.53e-08 0.8949609 
## 
## solution.w:
##  0.01620272 0.09458797 0.602976 0.003354611 0.004958239 0.008301019 0.0006792035 0.004129554 7.1671e-06 0.002696162 0.01265109 0.006793406 0.007292119 0.004432642 0.005266899 0.001785691 0.008972942 0.006975147 0.007725208 0.00835504 0.005195455 0.005936168 0.09760628 0.002473297 0.01141772 0.007119292 0.006310365 0.002439702 0.01200414 0.007740405 0.008677208 0.00715096 0.009493353 0.008135565 0.0001572507 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2328.134 
## 
## solution.v:
##  5.30321e-05 0.1046551 0.0002537122 0.8950382 
## 
## solution.w:
##  0.006626593 0.342385 0.3678504 0.002426462 0.004760421 0.001808788 0.0004068438 0.002617077 0.1644894 0.001766834 0.001299105 0.006976039 0.006173201 0.004938427 0.007463407 0.008923895 0.005237739 0.004967838 0.006076126 0.003227654 0.00184007 0.007857177 0.002909161 0.005893935 0.003143158 0.00318971 0.003585723 0.001601714 0.003877416 0.004487133 9.1115e-05 0.004390674 0.004049225 0.00261692 4.5645e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 50.63163 
## 
## solution.v:
##  0.002123697 0.07321669 0.07314639 0.8515132 
## 
## solution.w:
##  0.02190273 2.25819e-05 0.3732304 0.007052758 0.01099496 0.002224032 0.001685452 0.005059545 1.1991e-06 0.0004707162 0.01536511 0.02215125 0.00531861 0.006552714 0.006059304 0.002432422 0.009886072 0.008943374 0.006410924 0.004624974 0.001879424 0.01458252 0.3061971 0.0154737 0.01331127 0.00436871 0.002906834 0.001556195 0.008033605 0.006497867 0.003985555 0.004160434 0.009442289 0.004212152 0.09300323 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 96.96391 
## 
## solution.v:
##  8.28666e-05 0.4637105 0.1183832 0.4178235 
## 
## solution.w:
##  0.004244237 2.49278e-05 0.6492022 0.003814085 0.006216753 0.00349946 0.0001251348 0.003044203 0.002742631 0.001674568 0.003722272 0.006891457 0.004998547 0.00586057 0.006786148 0.006471404 0.005818824 0.005266795 0.00599002 0.003865838 0.002429801 0.00511892 0.00821923 0.009921709 0.004314431 0.003901807 0.003828324 0.002185308 0.004767864 0.004903378 0.003634891 0.004691052 0.005200211 0.003758036 0.202865 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29317.71 
## 
## solution.v:
##  0.05914463 0.879188 0.05890288 0.002764447 
## 
## solution.w:
##  0.02335361 0.02346171 0.0230072 0.133874 0.02388158 0.02239644 0.002195215 0.02419719 0.02029206 0.1043727 0.02291237 0.02352195 0.023356 0.02427174 0.0237085 0.0244385 0.02357414 0.02360043 0.02365457 0.02293804 0.0214858 0.02339639 0.02361469 0.02373597 0.0227684 0.02306471 0.02360607 0.02588554 0.02307538 0.02353696 0.02222209 0.02374652 0.02347724 0.02268871 0.03668755
Mu.RENT$p+
  scale_x_continuous(breaks = c(2002, 2005, 2007, 2010), 
                     labels = c(2002, 2005, 2007, 2010))

RENT3

## Multiple Unit treated (LA MSA)
Mu.RENT<-multiple.synth(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_3",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.time = 2005,
  treated.units = tst,
  control.units = sample(stc,length(stc)*0.2,replace = F), #NOTE I Sampling because its took lot of time
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010,
  special.predictors = list(
    list("RENT_3", 2005, "mean")
  )
  )
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 584.4984 
## 
## solution.v:
##  0.001754977 0.5579349 0.005815825 0.4344943 
## 
## solution.w:
##  0.00089621 0.0003188107 0.007952051 0.0003804584 0.0003845299 0.000567728 0.0003414801 0.02088617 0.0004559712 0.0007297507 0.6327239 0.001024956 0.0004712231 0.001192962 0.0007509652 0.001103969 0.002725959 0.0007366915 0.00168777 0.0006442423 0.0005422248 0.0004336575 0.0008120258 0.0008967398 0.0007078445 0.001046015 0.001170753 0.001542472 0.0002563188 7e-10 0.0003883309 0.0009606856 0.00258487 0.3121512 0.0005310807 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8198.84 
## 
## solution.v:
##  0.6815924 0.3155341 0.002824502 4.90151e-05 
## 
## solution.w:
##  0.02515377 0.02114418 0.02511443 0.03641917 0.01989886 0.02455768 0.01884577 0.02607702 0.02444533 0.02559735 0.03101691 0.02532373 0.02474506 0.02394172 0.02487625 0.02681112 0.02673723 0.02514449 0.02690796 0.02495453 0.02388955 0.08366512 0.0217272 0.02598314 0.02583221 0.09254419 0.02418994 0.02548866 0.01480148 0.0266321 0.02390173 0.02599592 0.026465 0.02550099 0.02567024 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 308.6567 
## 
## solution.v:
##  0.3849513 0.5857965 0.02793108 0.00132116 
## 
## solution.w:
##  0.006675716 0.004390453 0.01298046 0.0001688789 0.004091616 0.004995405 0.001587759 0.01734731 0.002557854 0.005235863 0.007798258 0.008175783 0.002908733 0.007152986 0.006279407 0.007521487 0.595668 0.005860838 0.008491267 8.0726e-06 0.004546815 0.002026212 0.0047109 0.2164022 0.004844971 0.005031517 0.005870173 0.009988441 0.004199036 0.001062387 0.003903602 0.0005015843 0.0111456 0.01280992 0.003060446 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5753.207 
## 
## solution.v:
##  0.506421 0.3796667 0.113738 0.0001742154 
## 
## solution.w:
##  0.009062881 0.002594404 0.01474668 0.002215263 0.00412138 0.006198087 0.003916824 0.2529712 0.0119394 0.008336028 0.1645744 0.006757307 0.005950313 0.005423966 0.006789413 0.008126466 0.1495646 0.007672962 0.0434363 0.004886405 0.002168484 0.002090638 0.007326608 0.1719952 0.006048665 5.4909e-06 0.009077844 0.01064118 2.3466e-06 1.47434e-05 0.007186211 0.01199065 0.02480137 0.02387573 0.00349053 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1387.261 
## 
## solution.v:
##  0.2222563 0.05894437 0.001000594 0.7177988 
## 
## solution.w:
##  0.01058033 0.003299359 0.01850041 0.002616879 0.00363363 0.006600066 0.002641008 0.02664554 0.0001957138 0.009249946 0.05371663 0.01138892 0.0068797 0.008361244 0.009267124 0.0107021 0.3137244 0.008962543 0.01013306 0.009855235 0.005394847 0.003294863 0.006193849 0.06702637 0.008946127 0.007065569 0.008432415 0.01459232 0.002512112 0.2764933 0.005051738 0.01766456 0.03139873 0.01397992 0.004999454 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 858.6656 
## 
## solution.v:
##  0.1071991 0.4807023 0.1020088 0.3100898 
## 
## solution.w:
##  0.002144587 0.0005561452 0.002750527 0.0001214591 0.0004552425 0.00154293 0.0001990386 0.004922799 1.4609e-05 0.00247925 0.0005875906 0.002276473 0.002878211 0.0009690732 0.002105372 0.002283423 0.4256462 0.002065844 0.001477387 0.003810904 0.001081645 0.0006047286 0.0005673984 0.261271 0.002896243 0.0007439999 0.0009580634 0.002521003 6.2117e-05 0.2482968 0.001338685 0.01031217 0.00713894 0.001622396 0.001297743 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 53809.23 
## 
## solution.v:
##  0.538656 0.1806643 7.7809e-05 0.2806018 
## 
## solution.w:
##  0.02123168 0.1386568 0.02600038 0.1874786 0.008311841 0.0142762 7.2838e-06 0.02732773 0.01143704 0.02079477 0.03482536 0.0237532 0.001681237 0.02766104 0.01862662 0.02899089 0.02677735 0.01959187 0.03163536 0.01197302 0.02081049 0.0226569 0.02046332 0.01887944 0.02248082 0.03306976 0.02479575 0.02525739 3.61486e-05 0.02991271 1.6505e-06 0.0214366 0.02662472 0.02909618 0.02343979
Mu.RENT$p+
  scale_x_continuous(breaks = c(2002, 2005, 2007, 2010), 
                     labels = c(2002, 2005, 2007, 2010))

RENT4

## Multiple Unit treated (LA MSA)
Mu.RENT<-multiple.synth(
  foo = RENT.merge,
  predictors = c("Unemployee.Rate","Personal.Income","Resident.Population"),
  predictors.op = "mean",
  dependent = "RENT_4",
  unit.variable = "MSA.Code", # UNIQ CODE (ID)
  time.variable = "YEAR",
  treatment.time = 2005,
  treated.units = tst,
  control.units = sample(stc,length(stc)*0.2,replace = F), #NOTE I Sampling because its took lot of time
  time.predictors.prior = c(2001:2005), 
  time.optimize.ssr = c(2001:2010),
  unit.names.variable = "MSA", 
  time.plot = 2001:2010,
  special.predictors = list(
    list("RENT_4", 2005, "mean")
  )
  )
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 653.4994 
## 
## solution.v:
##  0.2475537 4e-10 0.3496471 0.4027992 
## 
## solution.w:
##  0.004584586 0.001889296 0.003072429 0.007058775 0.003189559 0.001404736 0.003588134 0.001482793 0.004692809 0.002485706 0.00250163 0.001602182 0.008186796 0.002895503 0.005833798 0.004777535 0.002172596 0.8825701 0.003075175 0.00415793 0.003600779 0.004098231 0.005430468 0.003344256 0.003085218 0.003481447 0.001453442 0.003001896 0.001648995 1.05531e-05 0.004917873 0.004556275 0.003501994 0.003000086 0.003646437 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15671.99 
## 
## solution.v:
##  0.499995 0.3556245 0.1400089 0.004371644 
## 
## solution.w:
##  0.02549166 0.01127683 0.01380492 0.03548455 0.02154937 1.22828e-05 0.002238514 0.009208 0.01813675 0.01766827 0.02166999 0.07268923 0.02739961 0.02043471 0.02918595 0.02394456 0.1031879 0.1315827 0.01994547 0.02185802 0.01889235 0.02231522 0.05634977 0.0211767 0.02675078 0.02337798 0.01775675 0.01952432 0.01264227 0.0314604 0.03133215 0.02134601 0.02052845 0.0248492 0.02492833 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 256.6062 
## 
## solution.v:
##  0.3007407 0.1888566 0.4993112 0.01109159 
## 
## solution.w:
##  0.007441883 0.001179106 0.001947776 0.01401626 0.003731133 0.004055375 0.003188868 0.0009565701 0.002778357 0.002316628 0.00476501 0.004100524 0.1141412 0.002473626 0.005718575 0.006718884 0.001960909 0.3638247 0.003153508 0.004735897 0.003379554 0.006828026 0.3788721 0.003512477 0.008866795 0.006142725 0.00464965 0.002241562 0.001216261 0.004519966 0.01279432 0.003645009 0.003164278 0.002434344 0.004528187 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7822.748 
## 
## solution.v:
##  0.02544866 0.04459175 0.005307731 0.9246519 
## 
## solution.w:
##  0.009918032 0.007873534 3.2887e-06 0.01669419 0.01002321 0.005259294 0.007518704 0.005970993 0.09304124 0.009262698 0.008459909 0.005400064 0.0140109 0.01129619 0.01734217 0.006636184 0.01044894 0.3173623 0.009141183 0.01295009 0.001522305 0.008441737 0.2698737 0.01125131 0.008399429 0.006291054 0.005257075 0.0117781 0.00695535 0.02254009 0.01360637 0.0153727 0.01270611 0.01242494 0.01496663 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6769.199 
## 
## solution.v:
##  0.04600023 0.2985031 0.6528752 0.002621516 
## 
## solution.w:
##  0.009368314 0.00224284 0.003349234 0.006318964 0.005519987 0.0009991992 0.3673076 1.6803e-06 0.005198044 0.003671504 0.001928213 0.0009981017 0.007969175 0.003998305 0.006243091 0.004063719 0.001139013 0.001553472 0.0006208033 0.004628923 0.006492664 0.003884174 0.1182365 0.005426919 0.00251126 0.004828793 0.001353589 0.05912391 3.57065e-05 0.1607977 0.004680999 0.007444906 0.005493579 0.1796287 0.00294043 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 154.1438 
## 
## solution.v:
##  0.006292358 0.102816 0.1808304 0.7100612 
## 
## solution.w:
##  0.0006405024 0.001123415 0.002356664 6.495e-05 0.002492099 0.002545816 3.7208e-06 0.0006392006 0.003616265 0.002051776 0.004125854 0.003472826 0.004150924 0.002311097 0.002764024 0.007401932 0.002380653 0.7254489 0.001246407 0.005064667 0.001809785 0.006975551 0.1807503 0.002801649 0.006428056 0.003078359 0.00243844 0.002121204 0.001122418 2.8641e-06 0.006476825 0.003328247 0.002969 0.002465493 0.003330048 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 62176.26 
## 
## solution.v:
##  0.1881692 0.4716635 0.3401335 3.37852e-05 
## 
## solution.w:
##  0.02531346 0.01576247 0.0162435 0.02596182 0.02439288 4.6905e-06 0.02554029 0.01259149 0.01965074 0.02186647 0.0241201 0.204687 0.02361761 0.02472982 0.02693404 0.02293777 0.04262746 0.02695106 0.02538473 0.02229307 0.02073374 0.02167788 0.02494873 0.02367205 0.02410058 0.0247687 0.03093159 0.02394672 0.02026877 0.02816823 0.02542538 0.02270951 0.02307004 0.02804929 0.02591834
Mu.RENT$p+
  scale_x_continuous(breaks = c(2002, 2005, 2007, 2010), 
                     labels = c(2002, 2005, 2007, 2010))