Synthetic Control Analysis

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
library(ggrepel)
library(scales)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ lubridate 1.9.4     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.1
## ✔ readr     2.1.5
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ readr::col_factor() masks scales::col_factor()
## ✖ purrr::discard()    masks scales::discard()
## ✖ dplyr::filter()     masks stats::filter()
## ✖ dplyr::lag()        masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(Synth)
## ##
## ## Synth Package: Implements Synthetic Control Methods.
## 
## ## See https://web.stanford.edu/~jhain/synthpage.html for additional information.
library(fixest)
## 
## Attaching package: 'fixest'
## 
## The following object is masked from 'package:scales':
## 
##     pvalue
library(modelsummary)
## `modelsummary` 2.0.0 now uses `tinytable` as its default table-drawing
##   backend. Learn more at: https://vincentarelbundock.github.io/tinytable/
## 
## Revert to `kableExtra` for one session:
## 
##   options(modelsummary_factory_default = 'kableExtra')
##   options(modelsummary_factory_latex = 'kableExtra')
##   options(modelsummary_factory_html = 'kableExtra')
## 
## Silence this message forever:
## 
##   config_modelsummary(startup_message = FALSE)
library(gridExtra)
## 
## Attaching package: 'gridExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     combine
library(haven)
library(SCtools)
## Loading required package: future
library(psych)
## 
## Attaching package: 'psych'
## 
## The following object is masked from 'package:modelsummary':
## 
##     SD
## 
## The following objects are masked from 'package:scales':
## 
##     alpha, rescale
## 
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
library(flextable)
## 
## Attaching package: 'flextable'
## 
## The following object is masked from 'package:purrr':
## 
##     compose
library(officer)


ds <- read.csv("/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Data/AZUnivDeductionAnalysisData.csv")

ds_2012_2023 <- ds

ds <- ds %>% filter(year != 2012)

From the Synth package description:

“Implements the synthetic control method for causal inference in comparative case studies as developed in Abadie and Gardeazabal (2003) and Abadie, Diamond, Hainmueller (2010, 2011, 2014). synth estimates the effect of an intervention by comparing the evolution of an aggregate outcome for a unit affected by the intervention to the evolution of the same aggregate outcome for a synthetic control group.

synth constructs this synthetic control group by searching for a weighted combination of control units chosen to approximate the unit affected by the intervention in terms of characteristics that are predictive of the outcome. The evolution of the outcome for the resulting synthetic control group is an estimate of the counterfactual of what would have been observed for the affected unit in the absence of the intervention.

synth can also be used to conduct a variety of placebo and permutation tests that produce informative inference regardless of the number of available comparison units and the number of available time-periods. See Abadie and Gardeazabal (2003), Abadie, Diamond, and Hainmueller (2010, 2011, 2014) for details.

synth requires the user to supply four matrices as its main arguments. These matrices are named X0, X1, Z1, and Z0 accordingly. X1 and X0 contain the predictor values for the treated unit and the control units respectively. Z1 and Z0 contain the outcome variable for the pre-intervention period for the treated unit and the control unit respectively. The pre-intervention period refers to the time period prior to the intervention, over which the mean squared prediction error (MSPE) should be minimized. The MSPE refers to the squared deviations between the outcome for the treated unit and the synthetic control unit summed over all pre-intervention periods specified in Z1 and Z0.

Creating the matrices X1, X0, Z1, and Z0 from a (panel) dataset can be tedious. Therefore the Synth library offers a preparatory function called dataprep that allows the user to easily create all inputs required for synth. By first calling dataprep the user creates a single list object called data.prep.obj that contains all essential data elements to run synth.

Accordingly, a usual sequence of commands to implement the synthetic control method is to first call dataprep to prepare the data to be loaded into synth. Then synth is called to construct the synthetic control group. Finally, results are summarized using the functions synth.tab, path.plot, or gaps.plot.

An example of this sequence is provided in the documentation to dataprep. This procedure is strongly recommended. Alternatively, the user may provide his own preprocessed data matrices and load them into synth via the X0, X1, Z1, and Z0 arguments. In this case, no data.prep.obj should be specified.

The output from synth is a list object that contains the weights on predictors (solution.V) and weights on control units (solution.W) that define contributions to the synthetic control unit.”

Aggregate Data by State

colnames(ds)
##  [1] "X.1"                   "ein"                   "state"                
##  [4] "ntee"                  "subseccd"              "contributions"        
##  [7] "total_revenue"         "dir_fundraising_exp"   "curr_officers_comp"   
## [10] "fundraising_fees"      "total_assets"          "total_liabilities"    
## [13] "year"                  "numb_emply"            "emply_over_100k"      
## [16] "contractors_over_100k" "legal_fees"            "accounting_fees"      
## [19] "lobbying_fees"         "adv_promo"             "cash_nonint"          
## [22] "savings_tempinv"       "X"                     "ntee_maj"             
## [25] "ntee_category"         "contributions_mil"
table(ds$ntee_maj)
## 
##  Arts, Culture, and Humanities                      Education 
##                         138513                         217530 
##        Environment and Animals                         Health 
##                          70855                         210354 
##                 Human Services International, Foreign Affairs 
##                         550622                          27544 
##      Mutual/Membership Benefit       Public, Societal Benefit 
##                           4156                         169118 
##               Religion Related 
##                          83868
ds_state <- ds %>%
  group_by(state, year) %>%
  summarize(
    numb_npos = length(ein),
    prop_arts = (sum(ifelse(ntee_maj == "Arts, Culture, and Humanities", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_edu = (sum(ifelse(ntee_maj == "Education", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_env = (sum(ifelse(ntee_maj == "Environment and Animals", 1, 0))/sum(!is.na(ntee_maj))),
    prop_health = (sum(ifelse(ntee_maj == "Health", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_hso = (sum(ifelse(ntee_maj == "Human Services", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_int = (sum(ifelse(ntee_maj == "International, Foreign Affairs", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_member = (sum(ifelse(ntee_maj == "Mutual/Membership Benefit", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_socialbenefit = (sum(ifelse(ntee_maj == "Public, Societal Benefit", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    prop_religion = (sum(ifelse(ntee_maj == "Religion Related", 1, 0), na.rm = TRUE)/sum(!is.na(ntee_maj))),
    
    total_contributions = sum(contributions, na.rm = TRUE),
    median_contributions = median(contributions, na.rm = TRUE),
    mean_contributions = mean(contributions, na.rm = TRUE),
    max_contributions = max(contributions, na.rm = TRUE),
    min_contributions = min(contributions, na.rm = TRUE),
    sd_contributions = sd(contributions, na.rm = TRUE),

    total_revenues = sum(total_revenue, na.rm = TRUE),
    median_revenues = median(total_revenue, na.rm = TRUE),
    mean_revenues = mean(total_revenue, na.rm = TRUE),
    max_revenues = max(total_revenue, na.rm = TRUE),
    min_revenues = min(total_revenue, na.rm = TRUE),
    sd_revenues = sd(total_revenue, na.rm = TRUE),

    total_emply = sum(numb_emply, na.rm = TRUE),
    median_emply = median(numb_emply, na.rm = TRUE),
    mean_emply = mean(numb_emply, na.rm = TRUE),
    max_emply = max(numb_emply, na.rm = TRUE),
    min_emply = min(numb_emply, na.rm = TRUE),
    sd_emply = sd(numb_emply, na.rm = TRUE),

    total_emply_over_100k = sum(emply_over_100k, na.rm = TRUE),
    median_emply_over_100k = median(emply_over_100k, na.rm = TRUE),
    mean_emply_over_100k = mean(emply_over_100k, na.rm = TRUE),
    max_emply_over_100k = max(emply_over_100k, na.rm = TRUE),
    min_emply_over_100k = min(emply_over_100k, na.rm = TRUE),
    sd_emply_over_100k = sd(emply_over_100k, na.rm = TRUE),

    total_contractors_over_100k = sum(contractors_over_100k, na.rm = TRUE),
    median_contractors_over_100k = median(contractors_over_100k, na.rm = TRUE),
    mean_contractors_over_100k = mean(contractors_over_100k, na.rm = TRUE),
    max_contractors_over_100k = max(contractors_over_100k, na.rm = TRUE),
    min_contractors_over_100k = min(contractors_over_100k, na.rm = TRUE),
    sd_contractors_over_100k = sd(contractors_over_100k, na.rm = TRUE),
    
    total_dir_fundraising_exp = sum(dir_fundraising_exp, na.rm = TRUE),
    median_dir_fundraising_exp = median(dir_fundraising_exp, na.rm = TRUE),
    mean_dir_fundraising_exp = mean(dir_fundraising_exp, na.rm = TRUE),
    max_dir_fundraising_exp = max(dir_fundraising_exp, na.rm = TRUE),
    min_dir_fundraising_exp = min(dir_fundraising_exp, na.rm = TRUE),
    sd_dir_fundraising_exp = sd(dir_fundraising_exp, na.rm = TRUE),

    total_curr_officers_comp = sum(curr_officers_comp, na.rm = TRUE),
    median_curr_officers_comp = median(curr_officers_comp, na.rm = TRUE),
    mean_curr_officers_comp = mean(curr_officers_comp, na.rm = TRUE),
    max_curr_officers_comp = max(curr_officers_comp, na.rm = TRUE),
    min_curr_officers_comp = min(curr_officers_comp, na.rm = TRUE),
    sd_curr_officers_comp = sd(curr_officers_comp, na.rm = TRUE),

    total_legal_fees = sum(legal_fees, na.rm = TRUE),
    median_legal_fees = median(legal_fees, na.rm = TRUE),
    mean_legal_fees = mean(legal_fees, na.rm = TRUE),
    max_legal_fees = max(legal_fees, na.rm = TRUE),
    min_legal_fees = min(legal_fees, na.rm = TRUE),
    sd_legal_fees = sd(legal_fees, na.rm = TRUE),

    total_accounting_fees = sum(accounting_fees, na.rm = TRUE),
    median_accounting_fees = median(accounting_fees, na.rm = TRUE),
    mean_accounting_fees = mean(accounting_fees, na.rm = TRUE),
    max_accounting_fees = max(accounting_fees, na.rm = TRUE),
    min_accounting_fees = min(accounting_fees, na.rm = TRUE),
    sd_accounting_fees = sd(accounting_fees, na.rm = TRUE),

    total_lobbying_fees = sum(lobbying_fees, na.rm = TRUE),
    median_lobbying_fees = median(lobbying_fees, na.rm = TRUE),
    mean_lobbying_fees = mean(lobbying_fees, na.rm = TRUE),
    max_lobbying_fees = max(lobbying_fees, na.rm = TRUE),
    min_lobbying_fees = min(lobbying_fees, na.rm = TRUE),
    sd_lobbying_fees = sd(lobbying_fees, na.rm = TRUE),

    total_fundraising_fees = sum(fundraising_fees, na.rm = TRUE),
    median_fundraising_fees = median(fundraising_fees, na.rm = TRUE),
    mean_fundraising_fees = mean(fundraising_fees, na.rm = TRUE),
    max_fundraising_fees = max(fundraising_fees, na.rm = TRUE),
    min_fundraising_fees = min(fundraising_fees, na.rm = TRUE),
    sd_fundraising_fees = sd(fundraising_fees, na.rm = TRUE),

    total_adv_promo = sum(adv_promo, na.rm = TRUE),
    median_adv_promo = median(adv_promo, na.rm = TRUE),
    mean_adv_promo = mean(adv_promo, na.rm = TRUE),
    max_adv_promo = max(adv_promo, na.rm = TRUE),
    min_adv_promo = min(adv_promo, na.rm = TRUE),
    sd_adv_promo = sd(adv_promo, na.rm = TRUE),

    total_cash_nonint = sum(cash_nonint, na.rm = TRUE),
    median_cash_nonint = median(cash_nonint, na.rm = TRUE),
    mean_cash_nonint = mean(cash_nonint, na.rm = TRUE),
    max_cash_nonint = max(cash_nonint, na.rm = TRUE),
    min_cash_nonint = min(cash_nonint, na.rm = TRUE),
    sd_cash_nonint = sd(cash_nonint, na.rm = TRUE),

    total_savings_tempinv = sum(savings_tempinv, na.rm = TRUE),
    median_savings_tempinv = median(savings_tempinv, na.rm = TRUE),
    mean_savings_tempinv = mean(savings_tempinv, na.rm = TRUE),
    max_savings_tempinv = max(savings_tempinv, na.rm = TRUE),
    min_savings_tempinv = min(savings_tempinv, na.rm = TRUE),
    sd_savings_tempinv = sd(savings_tempinv, na.rm = TRUE),

    total_assets_mil = (sum(total_assets, na.rm = TRUE))/1000000,
    median_assets_mil = (median(total_assets, na.rm = TRUE))/1000000,
    mean_assets_mil = (mean(total_assets, na.rm = TRUE))/1000000,
    max_assets_mil = (max(total_assets, na.rm = TRUE))/1000000,
    min_assets_mil = (min(total_assets, na.rm = TRUE))/1000000,
    sd_assets_mil = (sd(total_assets, na.rm = TRUE))/1000000,

    total_liabilities_mil = (sum(total_liabilities, na.rm = TRUE))/1000000,
    median_liabilities_mil = (median(total_liabilities, na.rm = TRUE))/1000000,
    mean_liabilities_mil = (mean(total_liabilities, na.rm = TRUE))/1000000,
    max_liabilities_mil = (max(total_liabilities, na.rm = TRUE))/1000000,
    min_liabilities_mil = (min(total_liabilities, na.rm = TRUE))/1000000,
    sd_liabilities_mil = (sd(total_liabilities, na.rm = TRUE))/1000000
  )
## `summarise()` has grouped output by 'state'. You can override using the
## `.groups` argument.
ds_state <- ds_state %>%
  mutate(treatment = if_else((state == "AZ"), 1, 0))

Outliers

Check for Outliers

# Identify outliers by year
outliers <- ds_state %>%
  group_by(year) %>%
  mutate(
    upper = quantile(median_contributions, 0.75, na.rm = TRUE) + 1.5 * IQR(median_contributions, na.rm = TRUE),
    is_outlier = median_contributions > upper
  ) %>%
  filter(is_outlier)

# Set custom nudges just for 2012 panel
outliers <- outliers %>%
  mutate(
    hjust = case_when(
      year == 2012 & state == "WY" ~ 0,    # right-aligned
      year == 2012 & state %in% c("DE", "AK") ~ 1,  # left-aligned
      TRUE ~ 1
    ),
    nudge_x = case_when(
      year == 2012 & state == "WY" ~ 0.3,
      year == 2012 & state %in% c("DE", "AK") ~ -0.3,
      TRUE ~ -0.3
    )
  )


outliers_plot <- ggplot(ds_state, aes(x = as.factor(year), y = median_contributions)) +
  geom_boxplot() +
  geom_point(data = outliers, aes(color = "Outlier"), color = "black") +
  geom_text(
    data = outliers,
    aes(label = state),
    hjust = outliers$hjust,
    nudge_x = outliers$nudge_x,
    size = 3) +
  facet_wrap(~year, scales = "free_x") +
  labs(y = "\nMedian Contributions\n", x = NULL) +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(0, 500000)) +
  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    axis.text.x = element_blank(),     # remove axis tick labels
    axis.ticks.x = element_blank(),
    plot.margin = unit(c(2,4,2,1), "lines"))     # remove axis ticks
## Warning: The `size` argument of `element_rect()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
outliers_plot

ggsave(
  filename = "OutliersPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = outliers_plot,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 6.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)

It looks like Alaska and Delaware are consistently outliers in this data. I will run the analysis excluding these states and see if it differs. These outliers, defined as 1.5 times the interquartile range, are removed.

Remove Outliers

ds_state <- ds_state %>% filter(state != "AK") %>% filter(state != "DE")

Descriptive Statistics

# Select the variables for which to generate descriptive statistics
vars_to_describe <- ds_state %>%
  ungroup() %>%
  select(
    prop_arts, prop_edu, prop_env, prop_health, prop_hso, prop_int,
    prop_member, prop_socialbenefit, prop_religion,
    median_revenues, median_assets_mil, median_liabilities_mil, median_contributions
  )


# Generate descriptive statistics
desc_stats <- psych::describe(vars_to_describe)

# Round the results for better display
desc_stats <- round(desc_stats[, c("mean", "sd", "median", "min", "max", "n")], 2)

# Rename columns for clarity
colnames(desc_stats) <- c("Mean", "SD", "Median", "Min", "Max", "N")

# Create a flextable for export
desc_table <- flextable::flextable(data.frame(Variable = rownames(desc_stats), desc_stats))

# Optional: adjust formatting
desc_table <- desc_table %>%
  autofit() %>%
  set_table_properties(layout = "autofit")

# Create a Word document and add the table
doc <- read_docx() %>%
  body_add_par("Descriptive Statistics", style = "heading 1") %>%
  body_add_flextable(desc_table)

# Save the Word document
print(doc, target = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/descriptive_statistics.docx")

Prepare Data

First, I use the dataprep() function from the Synth package to prepare the data for input into the synth() function.

foo is the dataframe with the panel data, predictors are the variables that will be used to construct the synthetic control.

# Assign a numeric index to each state using match()

ds_state <- ds_state %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "HI" ~ 7,
             state == "IA" ~ 8,
             state == "ID" ~ 9,
             state == "IL" ~ 10,
             state == "IN" ~ 11,
             state == "KS" ~ 12,
             state == "KY" ~ 13,
             state == "LA" ~ 14,
             state == "MD" ~ 15,
             state == "ME" ~ 16,
             state == "MI" ~ 17,
             state == "MO" ~ 18,
             state == "MS" ~ 19,
             state == "MT" ~ 20,
             state == "NC" ~ 21,
             state == "ND" ~ 22,
             state == "NE" ~ 23,
             state == "NH" ~ 24,
             state == "NJ" ~ 25,
             state == "NM" ~ 26,
             state == "NV" ~ 27,
             state == "NY" ~ 28,
             state == "OH" ~ 29,
             state == "OK" ~ 30,
             state == "OR" ~ 31,
             state == "PA" ~ 32,
             state == "RI" ~ 33,
             state == "SC" ~ 34,
             state == "SD" ~ 35,
             state == "TN" ~ 36,
             state == "TX" ~ 37,
             state == "UT" ~ 38,
             state == "VA" ~ 39,
             state == "VT" ~ 40,
             state == "WA" ~ 41,
             state == "WI" ~ 42,
             state == "WV" ~ 43,
             state == "WY" ~ 44))

str(ds_state$state_id)
##  num [1:484] 1 1 1 1 1 1 1 1 1 1 ...
colnames(ds_state)
##   [1] "state"                        "year"                        
##   [3] "numb_npos"                    "prop_arts"                   
##   [5] "prop_edu"                     "prop_env"                    
##   [7] "prop_health"                  "prop_hso"                    
##   [9] "prop_int"                     "prop_member"                 
##  [11] "prop_socialbenefit"           "prop_religion"               
##  [13] "total_contributions"          "median_contributions"        
##  [15] "mean_contributions"           "max_contributions"           
##  [17] "min_contributions"            "sd_contributions"            
##  [19] "total_revenues"               "median_revenues"             
##  [21] "mean_revenues"                "max_revenues"                
##  [23] "min_revenues"                 "sd_revenues"                 
##  [25] "total_emply"                  "median_emply"                
##  [27] "mean_emply"                   "max_emply"                   
##  [29] "min_emply"                    "sd_emply"                    
##  [31] "total_emply_over_100k"        "median_emply_over_100k"      
##  [33] "mean_emply_over_100k"         "max_emply_over_100k"         
##  [35] "min_emply_over_100k"          "sd_emply_over_100k"          
##  [37] "total_contractors_over_100k"  "median_contractors_over_100k"
##  [39] "mean_contractors_over_100k"   "max_contractors_over_100k"   
##  [41] "min_contractors_over_100k"    "sd_contractors_over_100k"    
##  [43] "total_dir_fundraising_exp"    "median_dir_fundraising_exp"  
##  [45] "mean_dir_fundraising_exp"     "max_dir_fundraising_exp"     
##  [47] "min_dir_fundraising_exp"      "sd_dir_fundraising_exp"      
##  [49] "total_curr_officers_comp"     "median_curr_officers_comp"   
##  [51] "mean_curr_officers_comp"      "max_curr_officers_comp"      
##  [53] "min_curr_officers_comp"       "sd_curr_officers_comp"       
##  [55] "total_legal_fees"             "median_legal_fees"           
##  [57] "mean_legal_fees"              "max_legal_fees"              
##  [59] "min_legal_fees"               "sd_legal_fees"               
##  [61] "total_accounting_fees"        "median_accounting_fees"      
##  [63] "mean_accounting_fees"         "max_accounting_fees"         
##  [65] "min_accounting_fees"          "sd_accounting_fees"          
##  [67] "total_lobbying_fees"          "median_lobbying_fees"        
##  [69] "mean_lobbying_fees"           "max_lobbying_fees"           
##  [71] "min_lobbying_fees"            "sd_lobbying_fees"            
##  [73] "total_fundraising_fees"       "median_fundraising_fees"     
##  [75] "mean_fundraising_fees"        "max_fundraising_fees"        
##  [77] "min_fundraising_fees"         "sd_fundraising_fees"         
##  [79] "total_adv_promo"              "median_adv_promo"            
##  [81] "mean_adv_promo"               "max_adv_promo"               
##  [83] "min_adv_promo"                "sd_adv_promo"                
##  [85] "total_cash_nonint"            "median_cash_nonint"          
##  [87] "mean_cash_nonint"             "max_cash_nonint"             
##  [89] "min_cash_nonint"              "sd_cash_nonint"              
##  [91] "total_savings_tempinv"        "median_savings_tempinv"      
##  [93] "mean_savings_tempinv"         "max_savings_tempinv"         
##  [95] "min_savings_tempinv"          "sd_savings_tempinv"          
##  [97] "total_assets_mil"             "median_assets_mil"           
##  [99] "mean_assets_mil"              "max_assets_mil"              
## [101] "min_assets_mil"               "sd_assets_mil"               
## [103] "total_liabilities_mil"        "median_liabilities_mil"      
## [105] "mean_liabilities_mil"         "max_liabilities_mil"         
## [107] "min_liabilities_mil"          "sd_liabilities_mil"          
## [109] "treatment"                    "treatment_lab"               
## [111] "state_id"
ds_state_slim <- ds_state %>% 
  select("state_id", 
         "state", 
         "year", 
         "median_contributions",
         "mean_contributions",
         "sd_contributions",
         "total_contributions",
         "prop_arts", 
         "prop_edu", 
         "prop_env", 
         "prop_health", 
         "prop_hso", 
         "prop_int",
         "prop_member", 
         "prop_socialbenefit", 
         "prop_religion",
         "median_revenues",
         "mean_revenues",
         "total_revenues",
         "median_emply",
         "mean_emply",
         "total_emply",
         "median_curr_officers_comp", 
         "median_adv_promo",
         "median_cash_nonint", 
         "median_savings_tempinv", 
         "median_assets_mil",
         "mean_assets_mil",
         "total_assets_mil",
         "median_liabilities_mil",
         "mean_liabilities_mil",
         "total_liabilities_mil")

ds_state_slim <- as.data.frame(ds_state_slim)

class(ds_state_slim)
## [1] "data.frame"
data_prep_out <- dataprep(
  # This is the main data frame that contains the panel data.
  foo = ds_state_slim,
  
  # These are the time-invariant predictors to match treated and control units on.
  # The values for these variables will be aggregated over the years defined in
  # `time.predictors.prior` using the default aggregation function (mean).
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  
  # These are time-specific predictors — median_contributions measured in specific years
  # prior to treatment. Each entry includes the variable name, the year to extract, 
  # and the aggregation function (median, in this case).
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  
  # This is the dependent variable to be tracked over time and used to calculate
  # treatment effects (Y_it). In this case, it’s median contributions by state-year.
  dependent = "median_contributions",
  
  # This identifies the column in the dataset that contains the unit (state) IDs.
  unit.variable = "state_id",
  
  # This identifies the column in the dataset that contains the time (year) variable.
  time.variable = "year",
  
  # This specifies which unit received the treatment. Here, state 4 is the treated unit.
  treatment.identifier = 3,
  
  # These are the control units. This line selects all state IDs except the treated one
  # to be used as potential donor pool units in the synthetic control.
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  
  # These are the years over which the predictor values are aggregated for the variables
  # listed in `predictors`. Typically, these are the pre-treatment years.
  time.predictors.prior = 2013:2018,
  
  
  # These are the years over which the synthetic control algorithm will optimize the
  # weights (to minimize pre-treatment root mean square prediction error).
  time.optimize.ssr = 2013:2018,
  
  # These are the full range of years to be plotted in the final output. They typically
  # span from pre-treatment to post-treatment.
  time.plot = 2013:2023,
  
  # This specifies the column that contains the names of the units (states),
  # which will be used for labeling in plots and summaries.
  unit.names.variable = "state")

X1 in the data_prep_out object gives the average for each predictor for the treatment group across the pre-treatment period.

data_prep_out$X1
##                                              3
## prop_arts                         7.925001e-02
## prop_edu                          2.051468e-01
## prop_env                          5.282166e-02
## prop_health                       1.345248e-01
## prop_hso                          3.373724e-01
## prop_int                          1.548626e-02
## prop_socialbenefit                1.062450e-01
## prop_religion                     6.569756e-02
## median_revenues                   6.125208e+05
## median_assets_mil                 7.227549e-01
## median_liabilities_mil            4.793183e-02
## special.median_contributions.2013 2.216740e+05
## special.median_contributions.2014 2.244410e+05
## special.median_contributions.2015 2.287780e+05
## special.median_contributions.2016 2.307710e+05

X0 in the data_prep_out object provides the average for each predictor for each state in the non-weighted control group across the pre-treatment period

data_prep_out$X0 # average for each predictor for each state in the non-weighted control group across the pre-treatment period
##                                              1            2            4
## prop_arts                         7.312413e-02 6.644502e-02 1.053123e-01
## prop_edu                          1.290563e-01 1.465321e-01 1.754915e-01
## prop_env                          4.110152e-02 3.104467e-02 5.270128e-02
## prop_health                       1.322626e-01 1.396833e-01 1.168471e-01
## prop_hso                          4.095103e-01 4.294277e-01 3.549412e-01
## prop_int                          1.161858e-02 1.385504e-02 2.417731e-02
## prop_socialbenefit                1.202179e-01 1.060108e-01 1.077191e-01
## prop_religion                     8.054250e-02 6.582166e-02 6.093518e-02
## median_revenues                   3.508884e+05 4.001966e+05 5.156944e+05
## median_assets_mil                 5.579960e-01 6.927166e-01 6.545606e-01
## median_liabilities_mil            1.573367e-02 3.185550e-02 3.888875e-02
## special.median_contributions.2013 1.515620e+05 1.607915e+05 2.000000e+05
## special.median_contributions.2014 1.526380e+05 1.465400e+05 2.066610e+05
## special.median_contributions.2015 1.531990e+05 1.447255e+05 2.109760e+05
## special.median_contributions.2016 1.641330e+05 1.487540e+05 2.138720e+05
##                                              5            6            7
## prop_arts                         1.069016e-01 8.800069e-02 1.396416e-01
## prop_edu                          1.616871e-01 1.441875e-01 1.636630e-01
## prop_env                          5.669215e-02 5.318211e-02 6.927511e-02
## prop_health                       1.568243e-01 1.440490e-01 1.435296e-01
## prop_hso                          3.767440e-01 3.625675e-01 3.271714e-01
## prop_int                          1.297878e-02 2.003202e-02 1.435145e-02
## prop_socialbenefit                9.963202e-02 1.073689e-01 1.002224e-01
## prop_religion                     2.603357e-02 7.724721e-02 3.467357e-02
## median_revenues                   5.200488e+05 5.069774e+05 5.398912e+05
## median_assets_mil                 1.091757e+00 6.496677e-01 8.468964e-01
## median_liabilities_mil            6.373575e-02 4.116950e-02 5.940075e-02
## special.median_contributions.2013 1.555180e+05 1.774680e+05 2.271440e+05
## special.median_contributions.2014 1.642900e+05 1.864600e+05 2.336060e+05
## special.median_contributions.2015 1.622175e+05 1.931410e+05 2.378880e+05
## special.median_contributions.2016 1.733185e+05 1.963310e+05 2.301730e+05
##                                              8            9           10
## prop_arts                         1.036581e-01 7.139399e-02 9.222110e-02
## prop_edu                          1.399194e-01 1.800484e-01 1.535699e-01
## prop_env                          3.409859e-02 9.243461e-02 3.495331e-02
## prop_health                       1.539153e-01 1.316489e-01 1.615453e-01
## prop_hso                          3.870968e-01 3.767993e-01 3.593243e-01
## prop_int                          7.905884e-03 1.394414e-02 1.672444e-02
## prop_socialbenefit                1.286351e-01 8.193073e-02 1.221787e-01
## prop_religion                     4.137658e-02 5.047141e-02 5.539326e-02
## median_revenues                   4.216595e+05 4.781724e+05 5.469302e+05
## median_assets_mil                 9.370691e-01 6.717532e-01 8.744672e-01
## median_liabilities_mil            3.803325e-02 2.797975e-02 5.566375e-02
## special.median_contributions.2013 1.188495e+05 1.974895e+05 1.906760e+05
## special.median_contributions.2014 1.184415e+05 1.944330e+05 1.879400e+05
## special.median_contributions.2015 1.249840e+05 2.200280e+05 1.934110e+05
## special.median_contributions.2016 1.303000e+05 2.127780e+05 1.810635e+05
##                                             11           12           13
## prop_arts                         8.259948e-02 1.004429e-01 8.695920e-02
## prop_edu                          1.249345e-01 1.493631e-01 1.395427e-01
## prop_env                          3.583853e-02 2.910745e-02 3.973271e-02
## prop_health                       1.306527e-01 1.874002e-01 1.594994e-01
## prop_hso                          4.023494e-01 3.438564e-01 4.044829e-01
## prop_int                          1.635322e-02 1.045431e-02 7.099290e-03
## prop_socialbenefit                1.441260e-01 1.365918e-01 1.035305e-01
## prop_religion                     6.163983e-02 4.119091e-02 5.576264e-02
## median_revenues                   4.597948e+05 4.537142e+05 4.178208e+05
## median_assets_mil                 8.716637e-01 8.506339e-01 7.732713e-01
## median_liabilities_mil            3.558517e-02 2.896742e-02 4.321725e-02
## special.median_contributions.2013 1.829080e+05 1.689370e+05 1.440000e+05
## special.median_contributions.2014 1.842680e+05 1.392460e+05 1.451635e+05
## special.median_contributions.2015 1.861985e+05 1.406885e+05 1.545480e+05
## special.median_contributions.2016 1.959235e+05 1.490940e+05 1.505310e+05
##                                             14           15           16
## prop_arts                         8.853828e-02 7.835865e-02 1.108120e-01
## prop_edu                          1.531591e-01 1.266263e-01 1.587205e-01
## prop_env                          3.793815e-02 5.197041e-02 9.183315e-02
## prop_health                       1.367809e-01 1.739772e-01 1.810869e-01
## prop_hso                          3.913294e-01 3.804449e-01 3.378843e-01
## prop_int                          5.628217e-03 2.511839e-02 6.610233e-03
## prop_socialbenefit                1.324324e-01 1.196051e-01 9.197412e-02
## prop_religion                     5.191653e-02 4.244398e-02 1.981558e-02
## median_revenues                   4.625325e+05 5.358782e+05 5.300074e+05
## median_assets_mil                 7.850063e-01 8.830413e-01 1.148417e+00
## median_liabilities_mil            4.267642e-02 7.739542e-02 8.461867e-02
## special.median_contributions.2013 1.745855e+05 1.623035e+05 1.613480e+05
## special.median_contributions.2014 1.750000e+05 1.544680e+05 1.733800e+05
## special.median_contributions.2015 1.956500e+05 1.699310e+05 1.727820e+05
## special.median_contributions.2016 2.000000e+05 1.608790e+05 1.770050e+05
##                                             17           18           19
## prop_arts                         8.883762e-02 7.473053e-02 7.122141e-02
## prop_edu                          1.194579e-01 1.339432e-01 1.636604e-01
## prop_env                          4.305757e-02 3.282298e-02 3.902801e-02
## prop_health                       1.476688e-01 1.481286e-01 1.664143e-01
## prop_hso                          4.104437e-01 3.970778e-01 3.585547e-01
## prop_int                          1.479149e-02 1.435778e-02 8.492151e-03
## prop_socialbenefit                1.200985e-01 1.301600e-01 1.281130e-01
## prop_religion                     5.248004e-02 6.487520e-02 6.451602e-02
## median_revenues                   4.989093e+05 4.714832e+05 4.327014e+05
## median_assets_mil                 7.789808e-01 8.221308e-01 6.510892e-01
## median_liabilities_mil            5.597625e-02 4.056833e-02 2.920017e-02
## special.median_contributions.2013 1.593845e+05 1.727470e+05 1.701585e+05
## special.median_contributions.2014 1.676415e+05 1.754045e+05 1.609845e+05
## special.median_contributions.2015 1.805870e+05 1.798490e+05 1.519255e+05
## special.median_contributions.2016 1.816190e+05 1.952175e+05 1.658440e+05
##                                             20           21           22
## prop_arts                         8.947124e-02 7.921498e-02 6.626491e-02
## prop_edu                          1.215360e-01 1.627170e-01 1.008690e-01
## prop_env                          9.714516e-02 4.681970e-02 4.273778e-02
## prop_health                       1.574295e-01 1.359661e-01 2.131639e-01
## prop_hso                          3.751044e-01 3.882503e-01 4.086428e-01
## prop_int                          1.134244e-02 1.568884e-02 5.830195e-03
## prop_socialbenefit                1.191291e-01 1.070811e-01 1.174296e-01
## prop_religion                     2.667329e-02 6.187061e-02 4.024376e-02
## median_revenues                   4.629643e+05 4.380527e+05 4.990138e+05
## median_assets_mil                 7.759318e-01 7.523025e-01 1.077144e+00
## median_liabilities_mil            4.769692e-02 4.478150e-02 4.867692e-02
## special.median_contributions.2013 1.983350e+05 1.913990e+05 1.374010e+05
## special.median_contributions.2014 1.972260e+05 1.861050e+05 1.540530e+05
## special.median_contributions.2015 1.858770e+05 1.950710e+05 1.545140e+05
## special.median_contributions.2016 1.893780e+05 1.978690e+05 1.473150e+05
##                                             23           24           25
## prop_arts                         1.068945e-01 1.074219e-01 7.331703e-02
## prop_edu                          1.239927e-01 1.434251e-01 1.765320e-01
## prop_env                          3.528968e-02 5.809336e-02 3.444673e-02
## prop_health                       1.588458e-01 1.624292e-01 1.718227e-01
## prop_hso                          3.669589e-01 4.119677e-01 3.726194e-01
## prop_int                          5.987770e-03 9.746132e-03 1.920160e-02
## prop_socialbenefit                1.511040e-01 8.258058e-02 9.075311e-02
## prop_religion                     4.580566e-02 2.179140e-02 5.801834e-02
## median_revenues                   4.137337e+05 5.110047e+05 4.252648e+05
## median_assets_mil                 9.602954e-01 9.659686e-01 6.447369e-01
## median_liabilities_mil            2.744267e-02 8.642250e-02 3.843067e-02
## special.median_contributions.2013 1.408040e+05 1.339980e+05 1.198935e+05
## special.median_contributions.2014 1.466130e+05 1.459700e+05 1.296860e+05
## special.median_contributions.2015 1.382060e+05 1.468195e+05 1.237560e+05
## special.median_contributions.2016 1.423610e+05 1.484105e+05 1.296370e+05
##                                             26           27           28
## prop_arts                         1.226649e-01 8.243569e-02 1.252257e-01
## prop_edu                          1.494647e-01 1.192380e-01 1.497664e-01
## prop_env                          6.689553e-02 6.963297e-02 3.254309e-02
## prop_health                       1.308466e-01 1.558321e-01 1.555702e-01
## prop_hso                          3.648751e-01 3.877737e-01 3.480094e-01
## prop_int                          6.902206e-03 1.078068e-02 3.479847e-02
## prop_socialbenefit                1.171946e-01 1.185699e-01 1.071594e-01
## prop_religion                     3.906463e-02 5.438238e-02 4.366699e-02
## median_revenues                   4.749867e+05 4.947669e+05 6.206830e+05
## median_assets_mil                 5.684575e-01 4.969949e-01 9.396376e-01
## median_liabilities_mil            4.049242e-02 2.151100e-02 9.420408e-02
## special.median_contributions.2013 2.002930e+05 2.434410e+05 1.958285e+05
## special.median_contributions.2014 1.851490e+05 2.199580e+05 1.993315e+05
## special.median_contributions.2015 1.905985e+05 2.085360e+05 1.964150e+05
## special.median_contributions.2016 2.001700e+05 2.358565e+05 2.034600e+05
##                                             29           30           31
## prop_arts                         8.340697e-02 8.103705e-02 9.566095e-02
## prop_edu                          1.404588e-01 1.388173e-01 1.497503e-01
## prop_env                          3.565936e-02 3.505625e-02 8.594679e-02
## prop_health                       1.415274e-01 1.376912e-01 1.233271e-01
## prop_hso                          4.051995e-01 3.785069e-01 3.822495e-01
## prop_int                          9.665091e-03 1.440677e-02 1.842055e-02
## prop_socialbenefit                1.314719e-01 1.266570e-01 1.000571e-01
## prop_religion                     4.854055e-02 8.499319e-02 4.224154e-02
## median_revenues                   4.685118e+05 4.281911e+05 5.081491e+05
## median_assets_mil                 8.765516e-01 7.252868e-01 7.116224e-01
## median_liabilities_mil            5.846350e-02 1.642633e-02 3.650508e-02
## special.median_contributions.2013 1.549700e+05 1.791070e+05 1.870090e+05
## special.median_contributions.2014 1.618825e+05 1.962235e+05 1.936540e+05
## special.median_contributions.2015 1.674120e+05 1.911200e+05 2.017720e+05
## special.median_contributions.2016 1.677775e+05 1.913690e+05 2.044050e+05
##                                             32           33           34
## prop_arts                         8.211427e-02 1.041605e-01 8.054154e-02
## prop_edu                          1.552034e-01 1.692800e-01 1.737757e-01
## prop_env                          3.689686e-02 4.649655e-02 5.652563e-02
## prop_health                       1.689286e-01 1.620655e-01 1.379852e-01
## prop_hso                          3.975468e-01 3.823724e-01 3.550020e-01
## prop_int                          1.059426e-02 8.966843e-03 8.818768e-03
## prop_socialbenefit                9.957014e-02 8.994445e-02 1.230541e-01
## prop_religion                     4.412172e-02 3.114781e-02 6.256245e-02
## median_revenues                   5.271906e+05 5.665822e+05 4.087289e+05
## median_assets_mil                 1.053298e+00 1.239545e+00 6.038128e-01
## median_liabilities_mil            9.160758e-02 1.149959e-01 2.739892e-02
## special.median_contributions.2013 1.498295e+05 1.777675e+05 1.649930e+05
## special.median_contributions.2014 1.519890e+05 1.567130e+05 1.784400e+05
## special.median_contributions.2015 1.501930e+05 1.650000e+05 1.823450e+05
## special.median_contributions.2016 1.478820e+05 1.808335e+05 1.897465e+05
##                                             35           36           37
## prop_arts                         8.857674e-02 7.370956e-02 8.934881e-02
## prop_edu                          1.288322e-01 1.360658e-01 1.579344e-01
## prop_env                          3.362764e-02 4.237718e-02 3.988619e-02
## prop_health                       1.745244e-01 1.452050e-01 1.305509e-01
## prop_hso                          3.845227e-01 3.706035e-01 3.551486e-01
## prop_int                          8.367245e-03 1.876898e-02 1.779918e-02
## prop_socialbenefit                1.359745e-01 1.130334e-01 1.171305e-01
## prop_religion                     4.557461e-02 9.681417e-02 8.937668e-02
## median_revenues                   4.771622e+05 4.405651e+05 4.419648e+05
## median_assets_mil                 1.036404e+00 6.443825e-01 6.547205e-01
## median_liabilities_mil            5.832825e-02 3.780858e-02 1.657867e-02
## special.median_contributions.2013 1.698910e+05 1.940040e+05 1.905955e+05
## special.median_contributions.2014 1.627550e+05 1.918410e+05 1.983125e+05
## special.median_contributions.2015 1.808020e+05 1.988315e+05 2.023000e+05
## special.median_contributions.2016 1.758370e+05 2.184880e+05 1.955700e+05
##                                             38           39           40
## prop_arts                         1.123854e-01 8.773499e-02 1.308852e-01
## prop_edu                          1.645845e-01 1.523174e-01 1.454322e-01
## prop_env                          6.897694e-02 4.488372e-02 7.292523e-02
## prop_health                       1.284691e-01 1.333872e-01 1.752923e-01
## prop_hso                          3.528192e-01 3.662277e-01 3.630302e-01
## prop_int                          2.865966e-02 3.170030e-02 1.389069e-02
## prop_socialbenefit                1.149611e-01 1.304719e-01 8.254315e-02
## prop_religion                     2.783509e-02 5.101270e-02 7.799455e-03
## median_revenues                   5.148131e+05 4.326297e+05 5.084226e+05
## median_assets_mil                 6.782420e-01 8.240479e-01 8.530064e-01
## median_liabilities_mil            3.334008e-02 4.138567e-02 6.543058e-02
## special.median_contributions.2013 2.378145e+05 1.594775e+05 1.788920e+05
## special.median_contributions.2014 2.304090e+05 1.602765e+05 1.948600e+05
## special.median_contributions.2015 2.409845e+05 1.550085e+05 2.037460e+05
## special.median_contributions.2016 2.661390e+05 1.574800e+05 2.033530e+05
##                                             41           42           43
## prop_arts                         1.075558e-01 8.709597e-02 6.056078e-02
## prop_edu                          1.472415e-01 1.233555e-01 1.006623e-01
## prop_env                          6.227097e-02 5.536614e-02 4.071882e-02
## prop_health                       1.173518e-01 1.460560e-01 1.902793e-01
## prop_hso                          3.863200e-01 4.150827e-01 4.436084e-01
## prop_int                          2.145437e-02 8.395898e-03 3.068518e-03
## prop_socialbenefit                1.056834e-01 1.213446e-01 1.213723e-01
## prop_religion                     4.976950e-02 4.104014e-02 3.662983e-02
## median_revenues                   5.155862e+05 4.816500e+05 4.758123e+05
## median_assets_mil                 7.380090e-01 9.101963e-01 7.751388e-01
## median_liabilities_mil            3.826258e-02 6.826683e-02 6.079633e-02
## special.median_contributions.2013 2.067950e+05 1.505190e+05 1.608350e+05
## special.median_contributions.2014 2.115930e+05 1.468950e+05 1.476440e+05
## special.median_contributions.2015 2.243780e+05 1.476270e+05 1.515520e+05
## special.median_contributions.2016 2.214860e+05 1.578380e+05 1.661895e+05
##                                             44
## prop_arts                         1.010152e-01
## prop_edu                          1.403249e-01
## prop_env                          8.700331e-02
## prop_health                       1.354863e-01
## prop_hso                          4.226420e-01
## prop_int                          3.912363e-04
## prop_socialbenefit                7.847882e-02
## prop_religion                     3.133141e-02
## median_revenues                   4.031992e+05
## median_assets_mil                 7.697652e-01
## median_liabilities_mil            1.570367e-02
## special.median_contributions.2013 2.412870e+05
## special.median_contributions.2014 2.422570e+05
## special.median_contributions.2015 2.405700e+05
## special.median_contributions.2016 2.284830e+05

Y1 in the data_prep_out object provides the outcome variable for the treatment state in each of the years in both the pre and post treatment periods. In this instance, this is the median contributions to nonprofits in the state of Arizona in each of the years in the inclusive 2015 - 2023 period.

data_prep_out$Y1 # outcome data for treated
##             3
## 2013 221674.0
## 2014 224441.0
## 2015 228778.0
## 2016 230771.0
## 2017 243045.0
## 2018 233231.5
## 2019 204473.5
## 2020 267790.5
## 2021 315455.0
## 2022 433461.0
## 2023 451676.0

Y0 in the data_prep_out object provides the outcome variable for each unit in the control group for each year in each year of both the pre and post treatment periods.

data_prep_out$Y0 # outcome data for controls
##           1        2        4        5        6        7        8        9
## 2013 151562 160791.5 200000.0 155518.0 177468.0 227144.0 118849.5 197489.5
## 2014 152638 146540.0 206661.0 164290.0 186460.0 233606.0 118441.5 194433.0
## 2015 153199 144725.5 210976.0 162217.5 193141.0 237888.0 124984.0 220028.0
## 2016 164133 148754.0 213872.0 173318.5 196331.0 230173.0 130300.0 212778.0
## 2017 165906 154639.0 217252.0 164518.0 194218.0 232238.5 129084.0 216738.0
## 2018 163083 164560.0 220128.5 172080.0 202223.0 221222.0 130012.0 228255.5
## 2019 152468 149072.0 182304.5 145000.0 157605.5 208367.5 104226.5 207792.0
## 2020 186957 165071.0 246787.0 180690.0 204854.0 249845.5 130985.0 245135.5
## 2021 207063 184506.0 262436.5 201803.0 231778.0 277805.0 171440.0 284148.0
## 2022 238006 251047.0 340008.0 260452.0 276387.0 338727.5 219717.0 334147.0
## 2023 245313 243742.0 341183.0 233847.5 309496.0 336431.5 197920.5 371172.0
##            10       11       12       13       14       15       16       17
## 2013 190676.0 182908.0 168937.0 144000.0 174585.5 162303.5 161348.0 159384.5
## 2014 187940.0 184268.0 139246.0 145163.5 175000.0 154468.0 173380.0 167641.5
## 2015 193411.0 186198.5 140688.5 154548.0 195650.0 169931.0 172782.0 180587.0
## 2016 181063.5 195923.5 149094.0 150531.0 200000.0 160879.0 177005.0 181619.0
## 2017 182568.0 201601.5 163632.0 153067.0 203231.0 171160.0 180657.0 185337.0
## 2018 199195.0 207299.0 170086.0 152481.0 191870.0 183704.0 186623.5 192924.0
## 2019 175767.5 196766.0 143808.5 143266.0 138346.0 151360.0 157141.0 176404.5
## 2020 222518.0 227426.0 158060.0 172131.0 192742.0 209339.5 183494.5 206813.0
## 2021 255436.0 266755.5 202827.0 192403.0 208266.0 242903.0 248893.0 237024.0
## 2022 300786.0 300982.0 248558.0 231319.0 250159.0 277117.0 344271.0 296308.0
## 2023 309056.0 295642.0 245548.0 271550.0 263549.5 274983.5 295832.5 292143.0
##            18       19       20       21       22       23       24       25
## 2013 172747.0 170158.5 198335.0 191399.0 137401.0 140804.0 133998.0 119893.5
## 2014 175404.5 160984.5 197226.0 186105.0 154053.0 146613.0 145970.0 129686.0
## 2015 179849.0 151925.5 185877.0 195071.0 154514.0 138206.0 146819.5 123756.0
## 2016 195217.5 165844.0 189378.0 197869.0 147315.0 142361.0 148410.5 129637.0
## 2017 197800.0 169171.0 189371.0 203452.0 138533.5 149954.0 147281.0 135530.0
## 2018 205704.0 164997.5 197872.5 211527.0 139450.0 166308.5 152302.0 139977.5
## 2019 188702.5 165237.0 180214.0 197162.0 144741.5 143903.0 139511.5 113957.5
## 2020 211298.5 176242.5 218015.0 231738.0 153891.0 172579.5 183790.0 138417.0
## 2021 250207.0 182609.0 280198.0 255000.0 202298.0 219771.0 242988.0 150339.0
## 2022 300703.0 233016.0 325956.0 313264.5 259243.0 258667.5 290550.0 192510.0
## 2023 288699.0 261879.5 335253.0 342617.0 221150.0 246962.5 243764.0 199752.5
##            26       27       28       29       30       31       32       33
## 2013 200293.0 243441.0 195828.5 154970.0 179107.0 187009.0 149829.5 177767.5
## 2014 185149.0 219958.0 199331.5 161882.5 196223.5 193654.0 151989.0 156713.0
## 2015 190598.5 208536.0 196415.0 167412.0 191120.0 201772.0 150193.0 165000.0
## 2016 200170.0 235856.5 203460.0 167777.5 191369.0 204405.0 147882.0 180833.5
## 2017 187652.0 234589.0 207522.5 173088.5 193506.0 219713.0 152638.0 180325.0
## 2018 222452.0 260898.5 213065.0 176983.5 204181.0 216896.5 156054.5 191915.0
## 2019 194399.0 200800.0 176688.0 150894.0 175708.0 196253.5 135775.0 132955.0
## 2020 249457.5 268909.0 213543.0 187825.0 212925.0 235548.0 170687.5 169895.0
## 2021 252692.0 317953.0 244475.0 221421.0 219108.0 292292.0 207456.5 201644.0
## 2022 320838.0 390298.0 309521.0 247994.0 276736.0 360102.5 251641.5 295268.5
## 2023 331976.0 422563.5 327613.5 255950.0 277512.0 356671.0 253425.0 280278.0
##            34       35       36       37       38       39       40       41
## 2013 164993.0 169891.0 194004.0 190595.5 237814.5 159477.5 178892.0 206795.0
## 2014 178440.0 162755.0 191841.0 198312.5 230409.0 160276.5 194860.0 211593.0
## 2015 182345.0 180802.0 198831.5 202300.0 240984.5 155008.5 203746.0 224378.0
## 2016 189746.5 175837.0 218488.0 195570.0 266139.0 157480.0 203353.0 221486.0
## 2017 194063.0 173369.5 218818.5 195890.0 253178.0 166804.0 206152.5 216890.0
## 2018 209516.0 162588.0 227109.0 209799.0 252441.0 183460.0 213527.0 235354.0
## 2019 185151.0 154730.0 208769.0 202678.0 195125.0 158785.0 169489.0 245402.5
## 2020 220809.5 179051.0 239239.5 224533.5 265395.0 193325.0 208632.0 264817.0
## 2021 236185.0 227061.5 281696.0 228668.0 333357.0 215622.0 282785.0 312537.0
## 2022 287887.5 303319.0 327868.0 282035.0 360115.5 268706.0 321158.0 400319.0
## 2023 296903.0 283608.0 332889.0 300156.0 382836.0 252504.5 300212.5 395628.5
##            42       43       44
## 2013 150519.0 160835.0 241287.0
## 2014 146895.0 147644.0 242257.0
## 2015 147627.0 151552.0 240570.0
## 2016 157838.0 166189.5 228483.0
## 2017 154698.0 159125.0 231354.0
## 2018 154147.0 151929.5 231164.0
## 2019 165267.0 118000.0 163939.0
## 2020 165978.5 154356.0 253023.5
## 2021 211627.0 183257.0 307893.0
## 2022 259109.0 214729.0 322782.0
## 2023 236547.0 233406.0 336849.5

Generate Weights

synth_out <- synth(
  data.prep.obj = data_prep_out)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 32205387 
## 
## solution.v:
##  0.01188393 3.38243e-05 1.13731e-05 0.03042936 0.108281 0.2405447 0.01689954 0.0001010674 0.01203958 0.07923362 0.02517415 0.1169584 0.05891123 0.1120355 0.1874626 
## 
## solution.w:
##  2.033e-07 7.02e-08 0.0573685 9.88e-07 0.0002739451 0.545409 2.96e-07 0.1427018 0.000230417 6.061e-07 3.7389e-06 2.756e-07 1.243e-06 2.6519e-06 1.41899e-05 3.914e-07 1.3574e-06 0.0001900938 2.018e-06 8.537e-07 4.212e-07 7.438e-07 1.676e-07 8.64e-07 3.042e-07 0.1049054 9.5888e-06 5.495e-07 1.1866e-06 8.691e-07 8.83e-07 1.7623e-06 0.04221693 1.2597e-06 1.52719e-05 3.46e-08 0.1066389 8.092e-07 6.196e-07 3.43e-07 2.833e-07 6.77e-08 8.77e-08

Multiply the control units outcome matrix by the synthetic control weights column to get the synthetic control unit’s outcome data.

data_prep_out$Y0 %*% synth_out$solution.w
##      w.weight
## 2013 221542.7
## 2014 222327.7
## 2015 228659.1
## 2016 229445.0
## 2017 229998.2
## 2018 229137.8
## 2019 203572.1
## 2020 251394.6
## 2021 286169.3
## 2022 343644.0
## 2023 353946.9

Generate Tables for Arizona v. Synthetic Control v. All Other States

Check to see the comparison of the predictors in the pre-treatment and post-treatment periods.

real_AZ_predictors <- data_prep_out$X1
synth_AZ_predictors <- data_prep_out$X0 %*% synth_out$solution.w

real_AZ_predictors_ds <- as.data.frame(real_AZ_predictors)

synth_AZ_predictors_ds <- as.data.frame(synth_AZ_predictors)

predictors_comparison <- cbind(real_AZ_predictors_ds, synth_AZ_predictors_ds)
# Create labels for each column
colnames(real_AZ_predictors_ds) <- "Arizona"
colnames(synth_AZ_predictors_ds) <- "Synthetic Arizona"

# Average of all control states (not weighted)
avg_controls <- as.data.frame(rowMeans(data_prep_out$X0))
colnames(avg_controls) <- "Average of All Other States"

# Recalculate without formatting:
predictor_table <- cbind(real_AZ_predictors_ds, synth_AZ_predictors_ds, avg_controls)
rownames(predictor_table) <- rownames(data_prep_out$X1)
predictor_table <- as.data.frame(predictor_table)

# Keep as numeric and round
predictor_table[] <- lapply(predictor_table, function(x) round(as.numeric(x), 2))
class(predictor_table)
## [1] "data.frame"
# Format copy
predictor_table_fmt <- predictor_table

# Identify proportion and employment rows
proportion_rows <- grep("^prop_", rownames(predictor_table_fmt))

# Everything else = dollar values
dollar_rows <- setdiff(rownames(predictor_table_fmt), c(rownames(predictor_table_fmt)[proportion_rows]))

# Format accordingly
predictor_table_fmt[proportion_rows, ] <- round(predictor_table_fmt[proportion_rows, ], 3)

# Add commas to dollar values (convert to character for presentation)
predictor_table_fmt[dollar_rows, ] <- lapply(predictor_table_fmt[dollar_rows, ], function(x) format(x, big.mark = ",", scientific = FALSE))

predictor_table_fmt <- predictor_table_fmt %>%
  tibble::rownames_to_column(var = "Predictor")

predictor_table_fmt <- predictor_table_fmt %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    
    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",

    "special.median_contributions.2013.2018" = "Median Contributions ($)"
  ))


# Generate the formatted table
datasummary_df(
  predictor_table_fmt,
  title = "Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/PreTreatmentPredictorComparisons.docx")
## NULL

Weights of Predictor Variables in Selecting Synthetic Weights

# Step 1: Create named table
v_weights <- synth_out$solution.v
predictor_names <- rownames(data_prep_out$X1)

v_weight_table <- data.frame(
  Predictor = predictor_names,
  Weight = as.numeric(v_weights)
)

# Step 2: Format decimal places (e.g., 3 decimal places for proportions)
v_weight_table$Weight <- round(v_weight_table$Weight, 3)

# Step 3: Recode predictor names for presentation
v_weight_table <- v_weight_table %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    
    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",

    "special.median_contributions.2013.2018" = "Median Contributions ($)"
  ))

# Step 4: Export using datasummary_df
datasummary_df(
  v_weight_table,
  title = "Predictor Variable Weights in Synthetic Control Optimization",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/PredictorWeights.docx"
)
## NULL
datasummary_df(
  v_weight_table,
  title = "Predictor Variable Weights in Synthetic Control Optimization",
  fmt = "%.3f",
  output = "markdown")
Predictor Variable Weights in Synthetic Control Optimization
Predictor Weight
Proportion: Arts Orgs 0.012
Proportion: Education Orgs 0.000
Proportion: Environmental Orgs 0.000
Proportion: Health Orgs 0.030
Proportion: Human Services Orgs 0.108
Proportion: International Orgs 0.241
Proportion: Societal Benefit Orgs 0.017
Proportion: Religious Orgs 0.000
Median Total Revenue ($) 0.012
Median Total Assets ($M) 0.079
Median Total Liabilities ($M) 0.025
special.median_contributions.2013 0.117
special.median_contributions.2014 0.059
special.median_contributions.2015 0.112
special.median_contributions.2016 0.187

State Weights in Synthetic Arizona

# Vector of full state names ordered by state_id
state_fullnames <- c("Alabama", "Arkansas", 
                     "Arizona", "California", "Connecticut", 
                     "Florida", "Hawaii", "Iowa", 
                     "Idaho", "Illinois", "Indiana", "Kansas", 
                     "Kentucky", "Louisiana", "Maryland", 
                     "Maine", "Michigan", "Missouri", 
                     "Mississippi", "Montana", "North Carolina", 
                     "North Dakota", "Nebraska", "New Hampshire", 
                     "New Jersey", "New Mexico", "Nevada", 
                     "New York", "Ohio",
                     "Oklahoma", "Oregon", "Pennsylvania", 
                     "Rhode Island", "South Carolina", "South Dakota", 
                     "Tennessee", "Texas", "Utah", 
                     "Virginia", "Vermont", "Washington", 
                     "Wisconsin", "West Virginia", "Wyoming")

# Apply full state names to rownames, excluding Arizona (state_id = 4)
rownames(synth_out$solution.w) <- state_fullnames[-3]

# Create weights data frame
synth_weights <- data.frame(
  State = rownames(synth_out$solution.w),
  Weight = round(as.numeric(synth_out$solution.w), 4)
)

# Sort alphabetically
synth_weights <- synth_weights[order(synth_weights$State), ]

# Split into 2 columns for layout
n <- floor(nrow(synth_weights) / 2)

# Compute the number of rows in each column (adjust if odd total)
len1 <- n
len2 <- nrow(synth_weights) - n

# Fill shorter half with NAs
State_1 <- c(synth_weights$State[1:len1], rep(NA, len2 - len1))
Weight_1 <- c(synth_weights$Weight[1:len1], rep(NA, len2 - len1))
State_2 <- synth_weights$State[(len1 + 1):nrow(synth_weights)]
Weight_2 <- synth_weights$Weight[(len1 + 1):nrow(synth_weights)]

# Combine into data frame
weights_table <- data.frame(State_1, Weight_1, State_2, Weight_2)


# Display and export
library(modelsummary)

datasummary_df(
  weights_table,
  title = "State Weights in the Synthetic Arizona",
  fmt = "%.3f",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/SyntheticAZWeights.docx")
## NULL
datasummary_df(
  weights_table,
  title = "State Weights in the Synthetic Arizona",
  fmt = "%.3f",
  output = "markdown")
State Weights in the Synthetic Arizona
State_1 Weight_1 State_2 Weight_2
Alabama 0.000 New Hampshire 0.000
Arkansas 0.000 New Jersey 0.000
California 0.057 New Mexico 0.000
Connecticut 0.000 New York 0.000
Florida 0.000 North Carolina 0.000
Hawaii 0.545 North Dakota 0.000
Idaho 0.143 Ohio 0.000
Illinois 0.000 Oklahoma 0.000
Indiana 0.000 Oregon 0.000
Iowa 0.000 Pennsylvania 0.000
Kansas 0.000 Rhode Island 0.000
Kentucky 0.000 South Carolina 0.042
Louisiana 0.000 South Dakota 0.000
Maine 0.000 Tennessee 0.000
Maryland 0.000 Texas 0.000
Michigan 0.000 Utah 0.107
Mississippi 0.000 Vermont 0.000
Missouri 0.000 Virginia 0.000
Montana 0.000 Washington 0.000
Nebraska 0.000 West Virginia 0.000
Nevada 0.105 Wisconsin 0.000
NA Wyoming 0.000

The synthetic state is a combination of CA, HI, ID, & NM.

Plot Actual v. Synthetic AZ Contributions Trend

synthetic_AZ <- data_prep_out$Y0 %*% synth_out$solution.w

#Create the data for real and synthetic AZ median contributions
years <- 2013:2023
real_AZ_median_contributions <- as.numeric(data_prep_out$Y1)
synth_AZ_median_contributions <- as.numeric(data_prep_out$Y0 %*% synth_out$solution.w)

#Combine this data into a dataframe
df_synthAZ_plot <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions, synth_AZ_median_contributions),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

# Plot using ggplot
synth_control_plot_AZ <- ggplot(df_synthAZ_plot, aes(x = year, y = value, color = group, linetype = group)) +
  geom_line(size = 1) +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  
  # Add annotation text and arrow pointing to the policy adoption line
  annotate("text",
           x = 2017.75, y = 75000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = 75000,
           yend = 75000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +

  # Format y-axis in thousands with dollar sign
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(0, 750000)) +

  # Ensure every year is shown on the x-axis
  scale_x_continuous(breaks = seq(min(df_synthAZ_plot$year), max(df_synthAZ_plot$year), by = 1)) +

  # Match line styles and color
  scale_linetype_manual(values = c("Arizona" = "solid", "Synthetic Arizona" = "dashed"), name = NULL) +
  scale_color_manual(values = c("Arizona" = "black", "Synthetic Arizona" = "black"), name = NULL) +

  # Axis labels and legend titles
  labs(
    x = "\nYear\n",
    y = "\nMedian Contributions to Nonprofits in Arizona\n") +

  # Theme and legend customization
  theme_classic(base_family = "Times New Roman") +
  theme(
    # Add plot borders on all sides
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.margin = unit(c(1, 3, 0, 0), "lines"),
    
    # Move legend to bottom right and put it in a box
    legend.position = c(0.95, 0.05),
    legend.justification = c("right", "bottom"),
    legend.background = element_rect(color = "black", fill = "white", size = 0.5),
    
    # Optional tweaks for readability
    legend.title = element_text(size = 8),
    legend.text = element_text(size = 8),
    legend.key.width = unit(1.5, "cm")
  )


synth_control_plot_AZ

ggsave(
  filename = "SynthControlPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_plot_AZ,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)

Plot the Gaps in Arizona Contributions

synthAZ_gaps <- real_AZ_median_contributions - synth_AZ_median_contributions

df_synthAZ_gaps <- data.frame(
  year = years,
  gap = synthAZ_gaps)

synth_control_gapsplot_AZ <- ggplot(df_synthAZ_gaps, aes(x = year, y = gap)) +
  geom_line(size = 1) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  
  # Add annotation text and arrow pointing to the policy adoption line
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +

  # Format y-axis in thousands with dollar sign
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +

  # Ensure every year is shown on the x-axis
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +

  # Axis labels and legend titles
  labs(
    x = "\nYear\n",
    y = "\nGap in Median Contributions\n") +

  # Theme and legend customization
  theme_classic(base_family = "Times New Roman") +
  theme(
    # Add plot borders on all sides
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.margin = unit(c(1, 3, 0, 0), "lines"))

synth_control_gapsplot_AZ

ggsave(
  filename = "SynthControlGapsPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_gapsplot_AZ,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)

Generate Arizona v. Synth. Arizona Median Contributions Comparison Table

# Create and format table with dollar signs and commas
contributions_comparison <- data.frame(
  Year = years,
  `Arizona (Observed)` = paste0("$", format(round(real_AZ_median_contributions, 0), big.mark = ",")),
  `Synthetic Arizona` = paste0("$", format(round(synth_AZ_median_contributions, 0), big.mark = ",")),
  `Difference` = paste0("$", format(round(real_AZ_median_contributions - synth_AZ_median_contributions, 0), big.mark = ",", scientific = FALSE))
)

datasummary_df(
  contributions_comparison,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2015–2023)",
  output = "markdown")
Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2015–2023)
Year Arizona..Observed. Synthetic.Arizona Difference
2013.00 $221,674 $221,543 $ 131
2014.00 $224,441 $222,328 $ 2,113
2015.00 $228,778 $228,659 $ 119
2016.00 $230,771 $229,445 $ 1,326
2017.00 $243,045 $229,998 $13,047
2018.00 $233,232 $229,138 $ 4,094
2019.00 $204,474 $203,572 $ 901
2020.00 $267,790 $251,395 $16,396
2021.00 $315,455 $286,169 $29,286
2022.00 $433,461 $343,644 $89,817
2023.00 $451,676 $353,947 $97,729
datasummary_df(
  contributions_comparison,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2015–2023)",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AZObservedVsSynthetic.docx"
)
## NULL
rownames(synth_out$solution.w)
##  [1] "Alabama"        "Arkansas"       "California"     "Connecticut"   
##  [5] "Florida"        "Hawaii"         "Iowa"           "Idaho"         
##  [9] "Illinois"       "Indiana"        "Kansas"         "Kentucky"      
## [13] "Louisiana"      "Maryland"       "Maine"          "Michigan"      
## [17] "Missouri"       "Mississippi"    "Montana"        "North Carolina"
## [21] "North Dakota"   "Nebraska"       "New Hampshire"  "New Jersey"    
## [25] "New Mexico"     "Nevada"         "New York"       "Ohio"          
## [29] "Oklahoma"       "Oregon"         "Pennsylvania"   "Rhode Island"  
## [33] "South Carolina" "South Dakota"   "Tennessee"      "Texas"         
## [37] "Utah"           "Virginia"       "Vermont"        "Washington"    
## [41] "Wisconsin"      "West Virginia"  "Wyoming"

Hypothesis Testing/Plaebo Tests/P-Value Generation

Placebo Tests

placebos <- generate.placebos(
  dataprep.out = data_prep_out,
  synth.out = synth_out,
  Sigf.ipop = 2)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7659817 
## 
## solution.v:
##  0.000494044 0.1127901 0.05577834 0.01993754 0.1075278 0.09313565 0.1470448 1.748e-07 0.002071928 6e-10 0.001276419 0.2111841 0.06471056 0.116354 0.06769458 
## 
## solution.w:
##  0.1060093 0.005742034 0.009546756 0.01133103 0.00282227 0.2019023 0.004393803 0.006216653 0.02869887 0.006613632 0.01778154 0.00930889 0.01439408 0.006337557 0.03631272 0.016698 0.006719825 0.009378893 0.008158768 8.7516e-06 0.01717924 0.01757634 0.01215898 0.007734899 0.006087379 0.007850533 0.02335219 0.01404095 0.01111656 0.009631167 0.006282792 0.00730516 0.009025859 0.01126349 0.008603178 0.001698818 0.0264617 0.007431368 0.009350796 0.06282402 0.2096872 0.00495903 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54312453 
## 
## solution.v:
##  0.1167616 0.06920096 0.07318052 0.009124903 0.01828255 0.02969824 0.03894383 0.1608988 0.0191647 0.08296746 0.049847 0.07837449 0.03326423 0.0583248 0.1619659 
## 
## solution.w:
##  0.3506551 0.003480966 0.003427127 0.005220257 0.0001961594 0.004802886 0.00571126 0.005750904 0.008771658 0.005452807 0.01149523 0.005722858 0.006971937 0.001728059 0.006390154 0.01187594 0.01282596 0.003344037 0.01020288 0.01659909 0.004324013 0.004605561 0.3262057 0.002551261 0.004792068 0.001663769 0.009643007 0.0116194 0.003496584 0.0126187 0.003635142 0.005004742 0.006206011 0.01013846 0.007538097 0.0008889903 0.006988324 0.001519006 0.002950265 0.007310829 0.08185113 0.003823283 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4928357 
## 
## solution.v:
##  0.106991 0.002692225 0.01268447 0.01989748 0.09595482 0.04121341 0.1641542 0.06626865 0.1257112 0.02975751 0.2551151 0.0006545316 0.01978382 0.01997016 0.03915135 
## 
## solution.w:
##  0.005205195 0.00442938 0.004511232 0.06415002 0.05560048 0.002766952 0.03088132 0.004755917 0.002645858 0.003268449 0.004028244 0.003088034 0.003295512 0.004166772 0.003310627 0.003369879 0.004740106 0.003292212 0.006583732 0.001220756 0.002202662 0.003490608 0.009477173 0.00719138 0.006293506 0.1409605 0.002193727 0.006449 0.01793842 0.002901627 0.003182184 0.006642291 0.001714706 0.006415878 0.2599351 0.259255 0.005362645 0.004922562 0.03042701 0.001854762 0.0002171585 0.005660433 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7485011 
## 
## solution.v:
##  0.006353009 0.0235457 0.02265944 0.006997972 1.413e-07 0.1752976 0.04426383 0.1874279 0.09325267 0.003987466 0.01449461 0.008630557 0.0635374 0.2642938 0.08525795 
## 
## solution.w:
##  0.004721679 0.005516663 0.006943892 0.004685244 0.009915532 1.51567e-05 0.006715031 0.008956557 0.006130589 0.008947819 0.004580063 0.007629803 0.008889175 2.49306e-05 0.006383106 0.006244495 0.007471366 0.008638141 0.00607876 0.002537964 0.006834658 0.6386544 0.003458918 0.009253092 0.005237139 0.03176996 0.007958399 0.003877904 0.008746607 0.001295248 0.008368601 0.00691246 0.00775464 0.00281868 0.003540123 0.08315249 0.01000442 0.02232817 0.005582512 0.0038604 0.002443566 0.005121551 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8600722 
## 
## solution.v:
##  0.08089915 0.04698862 0.06166449 0.1337479 0.1007883 5.4028e-06 0.07034432 0.009750903 0.002833181 0.0003062082 0.04417813 0.2026184 0.04783461 0.07029734 0.1277431 
## 
## solution.w:
##  0.01798746 0.007757814 0.03607119 0.01423893 0.04555042 0.01324656 0.05818434 0.01216746 0.008273129 0.01007953 0.0128811 0.008701454 0.01497364 0.04326877 0.01188705 0.01080453 0.01395623 0.01288507 0.01039786 0.00878024 0.01381418 0.009990827 0.02712967 0.01139108 0.00452264 0.0183374 0.008926601 0.02410986 0.03176987 0.009826595 0.007890471 0.03771135 0.00758993 0.2335591 0.1144346 0.0005778776 0.02023086 0.01905776 0.01274946 0.008945001 0.002421664 0.002917568 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 26523706 
## 
## solution.v:
##  0.01428481 0.00134184 0.001270876 0.001215378 3.5342e-06 7.8351e-06 0.0006019712 0.001446145 3.26227e-05 0.05414755 0.0003051791 0.0002536182 0.4051578 0.341718 0.1782129 
## 
## solution.w:
##  0.002394701 0.001981337 0.007695048 0.00401614 0.005227528 0.001068999 0.006165545 0.00584133 0.005142005 0.002033817 0.002395565 0.005218611 0.003209098 0.005047526 0.004188636 0.00434273 0.002677943 0.005545961 0.005301364 0.002698609 0.002240761 0.002519827 0.001001018 0.005855566 0.005321405 0.008510325 0.003485899 0.005431746 0.006289654 0.002664032 0.004038737 0.004310327 0.004315249 0.005266652 0.006114852 0.1836125 0.002975571 0.008679976 0.00976375 0.002437473 0.002311926 0.6406601 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 69230386 
## 
## solution.v:
##  0.0004715029 7.14105e-05 0.005057562 8.438e-07 3.9328e-06 3.00208e-05 0.000954918 0.007844661 0.03266219 4.35127e-05 0.007582376 0.04853218 0.8947458 0.001975631 2.34758e-05 
## 
## solution.w:
##  0.001974828 0.001761836 0.0005568045 0.001894771 0.001035618 4.62274e-05 0.0008657217 0.0009731822 0.001164834 1.45454e-05 0.00127514 0.001483447 0.0023006 0.001511212 0.001722741 0.001437182 0.002034256 0.0008293813 0.001114632 0.002166422 0.001650209 0.001905387 0.9468401 0.001141812 0.0003104353 0.000613085 0.001990223 0.0008546197 0.0008720937 0.002254749 0.002244844 0.001387789 0.001995007 0.0009281081 0.0007878135 0.0001240362 0.002080082 0.0008618596 0.0004633017 0.002150739 0.002338655 4.13531e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 40214053 
## 
## solution.v:
##  0.01081502 0.1210706 0.1296127 0.1404595 0.04628117 0.03727719 6.27129e-05 0.05912569 0.04175182 0.08062143 0.07818044 0.04991995 0.05285221 0.120261 0.03170861 
## 
## solution.w:
##  6.1609e-06 0.0004891058 0.008496717 0.002096059 0.001327886 0.0008381063 0.0004629534 0.001082191 0.0005059931 0.0008284523 0.0006803548 0.001173518 0.0008006947 0.01542864 0.000539617 0.0006333465 0.001503253 0.002028198 0.002396646 0.0002337321 0.0004597149 0.001045954 0.001089127 0.00102968 0.000823328 0.0005375157 0.0006850718 0.0006865098 0.3561832 0.0009268687 0.001694894 0.2563701 0.0005451525 0.0009007216 0.001304742 0.2240513 0.000808459 0.00211416 0.001094799 0.0005952365 0.0003132548 0.1051885 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 32855932 
## 
## solution.v:
##  0.03057646 0.0007210339 0.0003389551 0.07336311 0.0002450586 0.02978412 0.0007274016 0.000314504 0.03350842 0.1782958 0.1002736 0.2094201 0.00187954 0.1123899 0.2281619 
## 
## solution.w:
##  0.006824412 0.01241587 0.008387382 0.00407722 0.009419235 0.02179701 0.005406516 0.01277951 0.006669479 0.01446594 0.007041225 0.005231692 0.01945214 0.0008763148 0.007380129 0.005396015 0.01082314 0.01342041 0.008158754 0.2140794 0.003934669 0.006171533 0.008707097 0.009029113 0.03238077 0.3016007 0.007827428 0.007308327 0.00891739 0.01371708 0.002209921 0.005990131 0.001974817 0.004978165 0.01124769 4.4703e-06 0.009269972 0.002179684 0.007816515 0.007871699 0.007548118 0.145213 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10352184 
## 
## solution.v:
##  0.07076589 0.09040812 0.03654736 0.03263421 0.09363156 0.06696771 0.0227527 0.03811357 0.03045324 0.01409258 0.06315584 0.1469129 0.1124132 0.09859495 0.08255617 
## 
## solution.w:
##  0.05323401 0.007315749 0.004454015 0.002483253 0.003679988 0.002617721 0.00553018 0.00147287 0.004186729 0.0037355 0.003212913 0.007864489 0.00667864 0.001525592 0.1468007 0.323933 0.002582995 0.005141077 0.004255093 0.002959418 0.01176793 0.002271491 0.001723526 0.004073019 0.1375054 0.006696591 0.01639929 0.1141077 0.004630199 0.002218671 0.001451733 0.002588371 0.009422198 0.007189114 0.005503302 0.007933155 0.01605568 0.002171734 0.02853808 0.01060009 0.01348457 3.9936e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 85825343 
## 
## solution.v:
##  0.007321821 0.03337866 0.1911283 0.01228069 0.1042468 0.0002389552 0.05750579 0.02578242 0.003292856 0.004265476 0.01926031 0.2085977 0.146396 0.1066835 0.07962073 
## 
## solution.w:
##  0.0007808635 0.001172723 0.001427246 0.002218273 0.001454921 0.002434269 0.07343338 0.0005476127 0.007647928 0.001493376 0.001425828 0.001782219 0.003111585 0.002133451 0.001135309 0.001696642 0.5114025 0.00103776 0.00136145 0.001141397 0.3294069 0.0009821908 0.003567374 0.002260787 0.001145981 0.01395186 0.001455041 0.001157286 0.000711819 0.00258554 0.00520542 0.001053011 0.005889382 0.001283202 0.0009944987 0.001485813 0.003197222 0.001790071 0.0009170644 0.0009709896 0.001093046 5.66124e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4524529 
## 
## solution.v:
##  6.7167e-06 0.0006230776 0.01773151 0.2930973 8.859e-07 0.2497409 0.02104853 0.0005365378 0.07081292 1.49e-08 0.01169148 0.05576796 0.1076246 0.0003445836 0.1709729 
## 
## solution.w:
##  0.01984366 0.01440275 0.003102996 0.006161852 0.004068305 0.001985947 0.5493385 0.006730444 0.003038599 0.004514577 0.003554403 0.007428482 0.002943888 0.007814894 0.005139244 0.005012212 0.01137448 0.005452982 0.007477102 0.1098951 1.61548e-05 0.01045694 8.36009e-05 0.007188094 0.002032491 0.0003259107 0.006899911 0.006865161 0.004474429 0.006664488 0.006051583 0.01169569 0.005654137 0.004825073 0.005938126 0.0002323882 0.004483705 0.005136875 0.00308204 0.006860952 0.03028816 0.09146326 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 55497957 
## 
## solution.v:
##  0.01069652 0.1084074 0.06852956 0.04004286 0.06172533 0.1954979 0.1521877 0.008850895 0.02200159 0.01454653 0.004843432 0.0002762449 0.002591089 0.1327648 0.1770382 
## 
## solution.w:
##  0.001922653 0.002267715 0.002034015 0.002012227 0.001564937 0.002251095 0.002730118 0.001590303 0.002691779 0.1960572 0.002224741 0.002502002 0.0007816777 0.001386383 0.001865209 0.005434041 0.001501733 0.000571022 0.002553411 0.0006744037 6.2486e-06 0.001582751 0.001433621 1.52385e-05 0.0009010756 0.0009342766 0.02370901 0.002009164 0.001305293 0.002389232 0.003609825 0.3538229 0.2459741 0.001644476 0.001963605 0.001088145 0.0009790771 0.001277534 0.001770651 0.002091319 0.002219662 0.1146561 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 25204476 
## 
## solution.v:
##  9.74799e-05 0.0001263434 0.01116511 6.54886e-05 0.045924 0.06859598 0.1340198 0.001733956 0.000688204 0.3853755 0.0001064707 0.0005315264 0.2890301 0.06224836 0.000291716 
## 
## solution.w:
##  0.009829307 0.01264557 0.007652931 0.0122532 0.00895619 0.004985894 0.0550383 0.009009622 0.006925431 0.005030718 0.004460932 0.01234732 0.006479764 0.008702589 0.009513635 0.007087237 0.007955513 0.005903382 0.008186646 0.01002231 0.002175059 0.01970139 0.01666716 0.006927164 0.004192596 0.004212322 0.007835029 0.005789154 0.008603411 0.01556628 0.1064326 0.007430553 0.007239586 0.007809251 0.007009837 0.006119547 0.5157836 0.008877074 0.006819336 0.01170775 0.009244439 0.0008690503 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2931897 
## 
## solution.v:
##  0.002582652 0.01624818 0.05170863 0.007878105 0.02258221 0.001528874 0.00114419 0.09425316 0.0002324058 0.004048873 0.06052352 0.0668026 0.007536906 0.5679188 0.09501086 
## 
## solution.w:
##  0.00292613 0.002628762 0.003551834 0.001011414 0.004204321 0.002734499 0.00484889 0.005889351 0.003271976 0.002028745 0.006705831 0.003369234 0.002044184 0.00353807 0.001979413 0.002310992 0.006412388 0.05777264 0.002808046 0.001809977 0.005346706 0.3727476 0.009134355 0.004456556 0.00270371 0.002302084 0.002278395 0.002032942 0.004900993 0.003404449 0.03944234 0.006096717 0.002160969 0.00209708 0.002402975 0.001436388 0.006266738 0.4022872 0.002003049 0.003046323 0.000715293 0.0008902252 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22269379 
## 
## solution.v:
##  0.08851154 3.6e-08 0.2223793 0.1576333 0.02127832 0.000290084 0.05496103 0.2066397 0.06911067 0.04774322 1.188e-07 0.0836011 0.001874251 0.0428861 0.00309122 
## 
## solution.w:
##  0.01303877 1.51703e-05 0.01954704 0.0141221 0.02154834 0.009697298 0.0107059 0.01335801 0.01349976 0.001092986 0.004563151 0.01690138 0.01593806 0.01628344 0.008750111 0.1760979 0.006953954 0.00901739 0.01058635 0.01048158 0.002218615 0.02361172 0.02002551 0.01470758 0.009168805 0.03291641 0.3099344 0.005616352 0.01656126 0.02278475 0.01170874 0.01240467 0.00251343 0.01093239 0.01152895 0.01121903 0.007297457 0.01195519 0.01828462 0.02092053 0.02205314 0.009438177 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11733707 
## 
## solution.v:
##  1.049e-07 0.110072 0.0003741203 2.281e-07 0.005087194 1.29145e-05 0.08738816 0.1390932 2.785e-07 7e-10 0.01138034 0.1331297 0.03628408 0.03244588 0.4447318 
## 
## solution.w:
##  0.008977342 0.006230133 0.004072268 0.008224802 0.003621742 0.004907651 0.008457406 0.00396708 0.006607742 0.269584 0.005618064 0.007547598 0.02475078 0.008218581 0.00748766 0.01596284 0.007240739 0.009422723 0.00536544 0.007613597 0.106289 0.007675778 0.006278732 0.009055657 1.17812e-05 0.007234546 0.01379865 0.006871214 0.007655968 0.006679641 0.00635717 0.009077615 0.01902579 0.3106268 7.0161e-06 0.009975801 0.007994783 0.00853344 0.005929187 0.01023956 0.01286837 0.003935245 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21019749 
## 
## solution.v:
##  0.01389965 0.0005299942 0.04822566 0.01062051 0.000722196 0.06348606 0.04882413 8.49327e-05 0.2176529 0.1194458 0.0005173348 0.09969489 0.00672333 0.2609194 0.1086532 
## 
## solution.w:
##  0.3107029 0.01568419 0.005344788 0.002416749 0.007232299 0.001751474 1.47738e-05 0.004478347 0.004406931 0.00604141 0.1657064 0.005534243 0.006556332 0.004682548 0.001693493 0.005941526 0.006860592 0.006910929 0.006059161 8.5723e-06 0.00270023 0.002525626 0.01627247 0.01445708 0.02085719 0.001428779 0.005726038 0.007717842 0.004739973 0.001870404 0.001270778 0.01165601 0.003299586 0.007996595 0.007576464 0.002865939 0.006953145 0.00286189 0.003405323 0.004008905 0.298111 0.0036708 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17103293 
## 
## solution.v:
##  0.0854473 0.2488258 0.05703814 0.0003926336 0.01412566 9.0448e-06 0.0309905 0.04979962 0.212926 0.005432815 0.01909481 0.003501852 0.05524665 0.08828513 0.1288841 
## 
## solution.w:
##  0.005666779 0.001276087 0.0001356511 0.0006622727 0.0009331961 0.0006418592 0.004205582 0.0009441319 0.0002507413 0.002522244 0.001902563 0.002305367 0.0008986234 0.002611606 0.1610324 0.00241199 0.001227418 0.000918688 0.0007688604 0.226438 0.02604185 9.4558e-06 0.0002645974 0.006018328 0.1809299 6.45239e-05 0.001604664 0.001336329 0.005490063 0.0002658974 5.45653e-05 0.001375215 0.00241186 0.001108594 0.0005838499 0.0009088839 0.002786907 0.0005370487 0.0008134598 0.0245786 0.05417702 0.2708841 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1130156 
## 
## solution.v:
##  0.2044501 6.499e-07 7.6556e-06 0.06979392 0.08216677 0.07232198 0.005667077 0.0005506939 0.01531896 0.01155259 0.00040852 0.4819205 9.91726e-05 0.04018381 0.01555762 
## 
## solution.w:
##  0.0327046 0.07297852 0.01694786 0.006243371 0.01139891 0.003858122 0.006654691 0.353579 0.007723002 0.03384131 0.005745583 0.008553738 0.01125993 0.009241392 0.004662192 0.01005604 0.01608903 0.00936974 0.009310862 0.005050557 0.006631266 0.004453284 0.00939149 0.00661449 0.1292097 0.00525115 0.01196503 0.01948353 0.01712267 0.007373464 0.005534963 0.01204624 0.006946475 0.030453 0.01835652 0.01032354 0.02499807 0.002976016 0.01898075 0.009652993 0.006953724 1.24798e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 83417556 
## 
## solution.v:
##  1.73757e-05 0.0007064042 0.004829046 0.004401639 0.1814469 0.08634125 0.001289922 0.001590536 0.04199358 0.09428488 0.04419511 0.4073523 0.0003069196 0.001768822 0.1294753 
## 
## solution.w:
##  0.002470655 0.003684259 0.001815193 0.01330189 0.002564717 0.002363361 0.3128152 0.002607032 0.004232113 0.004891092 0.005709736 0.005029964 0.005191582 0.003674995 0.01029628 0.004434692 0.004893592 0.003720439 0.003547465 0.002902265 0.008053914 0.3665624 4.4736e-06 0.002505515 0.0008100483 0.002178489 0.007567286 0.00371658 0.002710875 0.03101583 0.02263972 0.003055012 0.01350848 0.002135425 0.002668052 0.0004742787 0.002675473 0.004085911 0.001931885 0.01584607 0.1029973 0.002710117 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30467160 
## 
## solution.v:
##  0.007753876 8.7783e-05 0.003186227 0.0933936 0.1771656 1.26778e-05 0.0005106551 0.08223416 0.06361679 0.0005265127 0.04478711 0.1413677 0.0988335 0.1498516 0.1366722 
## 
## solution.w:
##  0.0166715 0.007136814 0.005758632 0.007486374 0.005774324 0.004169394 0.3052725 0.004422523 0.004854091 0.004952214 0.1918112 0.008480588 0.00537239 0.003965419 0.008968915 0.003476655 0.00457117 0.01953638 0.008632279 0.005605057 0.003359447 0.003998848 0.2256867 0.01004486 0.001234292 0.002220418 0.005878411 0.009991878 0.005095106 0.003447182 0.002465465 0.02579391 0.005380543 0.004484065 0.01219433 0.001506683 0.03445107 0.006385727 0.001851115 0.004735269 0.002247053 0.0006278032 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2748615 
## 
## solution.v:
##  0.001644035 0.08025966 0.01771062 0.03524114 0.00265083 0.005981634 0.0659587 0.0008606848 0.0003087489 0.01373789 0.000165916 0.5591494 0.2145394 0.001231587 0.000559756 
## 
## solution.w:
##  0.008667668 0.009774395 0.003403505 0.01680986 0.006531487 0.00212964 0.0006019722 0.00890875 0.002322342 0.0019533 0.001572341 0.02330898 0.002885881 0.005405418 0.02512035 0.008447847 0.003243134 0.002365301 0.004104288 0.00446017 0.2599045 0.001021962 0.4816312 0.003315767 0.0002224994 0.003773543 0.004553147 0.00322613 0.009415444 0.01654537 0.01192426 0.003832185 0.002299028 0.003700966 0.003126899 0.0003359842 0.004079169 0.01820461 0.004342564 0.01391295 0.004020964 0.00459407 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28007927 
## 
## solution.v:
##  3.967e-07 0.001298207 0.06464401 0.0532617 0.009626384 0.0001866286 0.0005077532 2.24061e-05 0.2974747 0.002052304 0.03329325 0.1468324 0.0103282 0.3526911 0.02778053 
## 
## solution.w:
##  0.001942335 0.003711202 0.001432607 0.004629798 0.002692886 0.0002539235 0.8509603 0.001538316 0.002326149 0.002808086 0.01175882 0.005921953 0.002766253 0.004408263 0.004646054 0.003385912 0.003544445 0.007487528 0.003133749 0.002780717 0.01110952 0.001552705 0.006205802 0.002491088 0.001150979 0.001224022 0.004128517 0.003306649 0.001865647 0.006051293 0.003388273 0.00421776 0.00429664 0.002761218 0.002616809 0.0001312086 0.004651538 0.002576561 0.0008810648 0.004893702 0.007514697 0.0008546109 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 44708827 
## 
## solution.v:
##  0.0002697298 0.001286092 0.06499052 0.001042349 0.0006785777 0.1095981 0.271158 0.05170857 0.184945 0.06391689 0.001166807 0.005982386 0.2060358 0.03219869 0.00502256 
## 
## solution.w:
##  0.0235867 0.01766354 0.00451986 0.01213254 0.006730437 0.0009727699 0.02548823 0.01785932 0.0050206 0.005606476 0.01857164 0.02562725 0.0165965 0.007680043 0.01994446 0.0106481 0.007826735 0.02042986 0.02467694 0.01066737 0.01381943 0.02061885 0.02194381 0.01832011 0.4502716 0.002510612 0.01347301 0.006059845 0.01060412 0.01122521 0.01003329 0.02488611 0.01062742 0.006377588 0.005816366 -2.025e-07 0.007655752 0.0184091 0.004625011 0.02108911 0.03935085 3.24156e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 219045537 
## 
## solution.v:
##  0.0005159982 0.008154544 0.08428048 0.06719205 0.02625089 0.002368938 0.1304732 0.05436857 0.0152173 0.07364934 0.01651634 0.4096664 0.01192723 0.05859975 0.04081902 
## 
## solution.w:
##  0.005945387 0.004766975 0.004675839 0.001588375 0.006368157 0.001412672 0.001654295 0.003820464 0.00574637 0.005292825 0.00653432 0.002888399 0.003788068 0.00338664 0.00165437 0.003367937 0.004880095 0.009997746 0.01013534 0.005433639 0.002226821 0.00257094 0.001505462 0.002324518 0.01151321 0.003186395 0.002582555 0.0079595 0.003473985 0.001826207 0.00158479 0.004642191 0.00322709 0.0287784 0.01041967 0.6857728 0.003000567 0.002505675 0.004039423 0.002444551 0.00685023 0.1142241 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3425878 
## 
## solution.v:
##  0.1928062 0.000175707 0.1411914 0.000140471 0.3736389 0.1459287 0.003461701 0.06550145 0.0003707002 5.0032e-05 0.0001812054 0.0156802 8.48034e-05 1.43366e-05 0.06077418 
## 
## solution.w:
##  0.001324392 0.001412942 0.01618522 0.002580631 0.002340425 0.2192405 0.002862194 0.0005994277 0.004020034 0.002644706 0.002837769 0.001533089 0.001728728 0.002060833 0.0009077721 0.002241715 0.002186988 0.001474179 0.0006745416 0.001958924 0.0008529109 0.002973712 0.001818783 0.001352677 0.002207847 0.0009414248 0.001819977 0.002547386 0.001186294 0.001874358 0.002604755 0.001310327 0.002285271 0.002351069 0.003137071 0.2690297 0.4228935 0.00300039 0.003696607 0.001085187 0.0001576883 5.47041e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5522248 
## 
## solution.v:
##  5.1e-09 0.02842305 0 0.47653 1e-10 2e-10 1e-10 0.03968405 0.09931007 0 5.1e-09 0.3560528 4.84e-08 1.3e-09 3e-10 
## 
## solution.w:
##  0.03418887 0.02218732 0.03603212 0.01889667 0.01929696 0.007294288 0.2911982 0.01919106 0.008128837 0.03102345 0.004490285 0.01249594 0.02577129 0.01056394 0.007808995 0.02741144 0.01793235 0.008254202 0.01021391 0.01750633 0.004087248 0.01268976 0.01980852 0.003255652 0.02185819 0.0009994323 0.01072061 0.02003041 0.04458582 0.01291267 0.01126806 0.02113487 0.008312619 0.01189621 0.02043319 0.01125349 0.04218888 0.007719032 0.03456205 0.03579663 0.006499106 0.00809753 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13542018 
## 
## solution.v:
##  0.04962781 0.0190077 0.02984273 0.04022589 0.003747778 0.05011298 0.03664994 0.09999427 0.06168831 0.1115428 0.04591379 0.0265718 0.2202228 0.09451208 0.1103393 
## 
## solution.w:
##  0.01385887 0.01015827 5.2445e-06 0.004185848 0.001623022 0.002199572 0.007960052 0.002753309 0.005146977 0.0152722 0.007196345 0.008300895 0.008145734 0.004701514 0.003116768 0.006765309 0.01098994 0.009705517 0.006571341 0.005363389 0.009954128 0.0132937 0.003888247 0.00591965 0.004017674 0.001265918 0.002198971 0.008774108 0.003715212 0.005085047 0.002893718 0.006298112 0.008833878 0.05629885 0.6971533 0.001415626 0.006829322 0.002901554 0.002224322 0.006948279 0.009050428 0.007019419 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29684664 
## 
## solution.v:
##  0.0002546186 3.7506e-06 0.02941789 0.129435 4.163e-07 0.1656484 0.1224327 0.00916614 0.009695294 0.3757661 0.06872759 0.08793818 0.001193782 0.0002397264 8.04325e-05 
## 
## solution.w:
##  0.006033136 0.005643824 0.2956814 0.009210376 0.004683478 0.006790212 0.007460723 0.422282 0.004110636 0.00929685 0.001754003 0.005688198 0.00721739 0.005282145 0.00660222 0.00767509 0.005756242 0.003571398 0.008785011 0.006570675 0.0009433556 0.004257585 0.008990766 0.00410272 0.005703265 0.0005485433 0.006301274 0.007997417 0.006091857 0.005367843 0.006038807 0.007505941 0.002251103 0.003278015 0.004588445 0.0158711 0.02630439 0.005484626 0.03603351 0.009750213 0.002483161 1.06774e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10709731 
## 
## solution.v:
##  0.06780094 0.01118324 0.09774937 0.1140163 0.1395795 0.04204168 0.08046593 0.04070107 0.001117501 0.0001873261 4.1787e-05 0.0551067 0.06612167 0.05952177 0.2243652 
## 
## solution.w:
##  0.008966105 0.08467959 0.00520591 0.01132158 0.006459905 0.00377763 0.01532686 0.006173688 0.009270238 0.004515641 0.01103185 0.02797589 0.006594929 0.007361074 0.00778366 0.007925514 0.006844862 0.009770295 0.004158531 0.008245965 0.1036569 0.008980644 0.1472833 0.2968764 0.005301349 0.002224204 0.006775642 0.01079242 0.00677777 0.004818487 0.01853713 0.006615836 0.009220354 0.005101789 0.006703077 0.0004000577 0.006865783 0.008192471 0.003916065 0.008822212 0.07319682 0.005549108 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19237403 
## 
## solution.v:
##  0.07493734 0.05759022 0.06773242 0.09313836 0.02065563 0.1049957 3.7512e-06 0.0003671963 0.00083921 1.2329e-06 2.4573e-05 0.2691022 0.1202717 0.04994846 0.1403921 
## 
## solution.w:
##  0.007361002 0.009773961 0.01519182 0.03411079 0.005596364 0.022932 0.0001599553 0.05443555 0.004736997 0.005675118 0.4326865 0.00810276 0.05057601 0.002568607 0.03198668 0.005539819 0.006540145 0.008493646 0.003548092 0.0146794 0.0001505 7.5299e-06 0.01509585 0.0002274175 0.1087137 0.003907725 0.003624268 0.01047456 0.005623312 0.007823001 0.006597042 0.04438433 0.002932909 0.005130699 0.007436473 0.008166104 0.005026521 0.01002061 0.007194802 0.007695527 0.002465753 0.012607 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41200039 
## 
## solution.v:
##  0.08294457 0.1901881 0.0005588744 5.5293e-06 0.01594071 3.19268e-05 1.18229e-05 0.02304266 1.69126e-05 0.290731 0.1271914 0.06814536 0.1950822 0.004574202 0.001534766 
## 
## solution.w:
##  0.02463241 0.004958824 8.34329e-05 0.001871718 0.01182822 0.003521781 0.004209736 0.5392429 0.003117821 0.003088363 0.005092658 0.005507623 0.004118488 0.003214083 0.00164156 0.004416323 0.003861845 2.14549e-05 0.004054653 0.002087613 0.001710719 0.003767589 0.002683217 0.2422531 0.02705603 0.01534532 0.00244292 0.003300235 0.007638209 0.006058304 0.001885257 0.0008558054 0.001998263 0.009378361 0.01683235 0.003736815 0.004552948 0.003870287 0.005143049 0.002915058 0.003451692 0.0025528 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 37839155 
## 
## solution.v:
##  0.009683266 0.01053481 0.2153273 0.10805 0.008276353 0.04638798 0.01908479 0.005259883 0.07092337 0.01354005 0.01602192 0.1281826 0.09120776 0.1816402 0.07587975 
## 
## solution.w:
##  0.006859697 0.007920966 0.003896061 0.0046997 0.006212067 0.005303528 0.003595115 0.003927905 0.04965991 1.13222e-05 0.05703983 0.006081949 0.3074788 0.00466634 0.001847901 0.007480332 0.0132466 0.008518886 0.003673368 0.006115762 0.3710954 0.009529765 0.002154909 7.8934e-06 0.005254423 0.006254894 0.02728918 0.007387843 0.001141977 0.004125406 0.005110925 0.008539673 0.005720475 0.007716362 8.8874e-06 0.004121393 0.007574751 0.00462453 0.004262151 0.004771588 0.0002080063 0.004863502 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 26332672 
## 
## solution.v:
##  0.0718504 0.0001204965 0.1131338 0.004138775 0.008880878 0.01829311 0.02000204 0.004625076 0.0001700989 0.02896589 0.01897758 0.2516429 0.147891 0.03082684 0.2804812 
## 
## solution.w:
##  0.005890671 0.0008366735 0.009114603 0.004006415 0.01224632 8.68529e-05 0.002416638 0.01405057 0.004853166 0.002017975 0.003095349 0.003283341 0.003697202 0.004805311 0.003752896 0.003766756 0.4840865 0.00599214 0.0050314 0.01752749 7.1046e-06 0.002499679 0.003918752 0.00182843 0.004871373 0.04257112 0.004681827 0.0006243515 0.03663789 0.006511178 0.002760251 0.00404406 0.009276749 0.001238202 0.01757867 0.2522666 0.004201146 0.003800824 0.006311832 0.003792643 1.1157e-05 7.3083e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15363064 
## 
## solution.v:
##  0.1475723 0.05818378 0.01358094 0.2178323 0.03179404 0.01743271 0.03046815 0.02655947 0.02632484 0.01394989 0.1243544 0.1621959 0.045495 0.03405719 0.05019917 
## 
## solution.w:
##  0.006404156 0.003222442 0.3198534 0.001400711 0.004480371 0.002848628 0.002382257 0.01498818 0.002376541 0.001383117 0.003589987 0.002363585 0.00219798 0.0009971403 0.0007775241 0.001338726 0.002163708 0.007374359 0.001726419 0.003619844 0.0003899182 0.002946511 0.0005940275 0.00416203 0.003168119 0.004932309 0.0009906573 0.001536306 0.5499488 0.002016756 0.0007696104 0.0003260313 0.01850723 0.001246337 0.01163677 2.6011e-06 0.00342557 0.0008463206 0.0008174439 0.001142594 0.0003844062 0.00472032 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 331667362 
## 
## solution.v:
##  0.03721107 0.004278123 0.01002508 0.02054142 0.01561733 0.008870172 0.03221816 0.01721139 0.04168287 0.1170195 0.1932826 0.03913454 0.03105967 0.1245703 0.3072777 
## 
## solution.w:
##  0.0001095182 8.7855e-05 3.914e-07 0.0001037868 0.0001183013 0.4168176 6.95536e-05 6.55537e-05 0.0001054646 0.000165133 8.35942e-05 8.66368e-05 0.0001656889 7.67674e-05 9.53045e-05 0.000111275 0.0001422745 9.76117e-05 0.0001342804 0.000167639 6.67059e-05 8.08136e-05 7.16411e-05 6.97085e-05 0.0001139194 0.3958333 1.607e-07 9.80953e-05 0.0001523555 0.0001896873 6.47598e-05 7.56528e-05 0.0001481911 0.0001018719 7.6642e-06 0.0001596982 0.0001058849 0.0001470294 0.0001198674 8.04626e-05 7.75375e-05 0.1834304 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11126681 
## 
## solution.v:
##  0.004426559 0.03638021 0.01324696 1.1439e-06 0.1361058 0.02268434 0.2306749 0.01462058 0.02443762 0.06065305 6.52037e-05 0.04196743 0.06077744 0.1407602 0.2131985 
## 
## solution.w:
##  0.01205901 0.0101145 0.02140108 0.008334866 0.01446867 0.008266316 0.008963743 0.005839532 0.01738938 0.01257231 0.08498995 0.007157925 0.007314171 0.03448461 0.007094589 0.007866703 0.01038737 0.02327004 0.00935021 0.01001106 0.004830155 0.3630595 0.005264034 0.1073033 0.008670222 0.005668118 0.04282502 0.009078977 0.0141239 0.00862992 0.007341356 0.005226068 0.01727788 0.007822969 0.01185575 0.02112725 0.01423479 0.005882062 0.007857754 0.006520494 0.003763247 0.0002966027 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 39127674 
## 
## solution.v:
##  0.01516447 0.001123603 0.2598133 0.0002634246 0.01246784 0.1028547 0.001007186 0.04458216 0.03562543 0.1255527 0.04862947 0.01997102 0.05563073 0.09798855 0.1793254 
## 
## solution.w:
##  0.006112399 0.006125522 0.006636154 0.00885278 0.005379739 0.09065102 0.008563435 0.001458377 0.006096232 0.004797386 0.00821152 0.008108347 0.007428045 0.007924675 0.3578662 0.007764134 0.004905108 0.006744486 2.53155e-05 0.00595759 0.006426543 0.007690946 0.0170049 0.007861184 0.02543922 0.007169264 0.006867798 0.007380455 0.004278965 0.006417249 0.007027837 0.006594727 0.00797671 0.006283398 0.003565632 0.004450019 0.249919 0.00688244 0.006836428 0.009001564 0.009360485 0.02595595 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 36336312 
## 
## solution.v:
##  0.000615543 0.00169655 0.0005596019 0.2056223 0.09196147 0.04591061 0.1769867 0.06421182 0.02933686 0.01938937 0.005310877 0.01307179 0.05262834 0.1975755 0.09512271 
## 
## solution.w:
##  0.009662084 0.009461237 0.2999248 0.004038499 0.006397437 0.0007463348 0.003356912 0.01933753 0.003301387 0.01356917 0.001100041 0.003770341 0.007857106 0.00272615 0.001991561 0.007422444 0.005560134 0.002166823 0.00326579 0.01053901 0.0001398126 0.002368025 0.004295802 0.00250274 0.006840407 0.003205804 0.004225039 0.007015413 0.008055946 0.06304676 0.003256732 0.003919562 0.00471315 0.001996291 0.005795709 0.01123272 0.2903614 0.007610406 0.002360194 0.005988663 0.001102249 0.1437713 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1999377 
## 
## solution.v:
##  0.04344709 0.04362781 0.00195782 0.0019575 0.04898826 0.06311832 0.1224393 0.1248097 0.01223992 0.02134506 0.01623109 0.02924328 0.0922784 0.2977009 0.08061559 
## 
## solution.w:
##  0.007362465 0.009546643 0.003396106 0.01106725 0.005646457 0.00318807 0.3174952 0.003644734 0.006255851 0.008669313 0.004553551 0.008910426 0.00600379 0.01332415 0.00984478 0.01194051 0.008061732 0.00567967 0.0095875 0.005359048 0.02517273 1.47942e-05 0.02649643 0.003946927 0.006649492 0.005517894 0.007469439 0.0116239 0.005182052 0.006246409 0.01614886 0.01472717 0.004702793 0.01007602 0.004711439 0.003646885 0.002260254 0.008601048 0.008053046 0.004302816 0.3608066 0.004105429 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 46339628 
## 
## solution.v:
##  0.05329028 0.05035947 0.04193925 0.000634638 0.1105339 0.1048185 0.0352846 0.006788841 0.00389367 0.26953 0.03736508 0.03951622 0.1248999 0.06515931 0.05598639 
## 
## solution.w:
##  0.2099427 0.2380421 0.0007019839 0.0008979698 0.002296932 0.000105481 0.0006859831 0.002057591 0.001344246 0.003302826 0.001595618 0.008676049 0.004937608 0.001948996 0.0009480241 0.01162477 0.003924181 0.003011772 0.004377042 0.002399059 0.3679911 0.001515545 0.002671525 0.001817669 0.004009524 0.01637322 0.0001524811 0.005145302 0.002598136 0.002248432 0.001136719 0.0009115202 0.002528734 0.002074117 0.003219434 0.001562442 0.0001272314 0.0009185395 0.001573868 0.001585883 0.06475936 0.01225645 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 82631352 
## 
## solution.v:
##  0.0004391099 0.1139734 0.007532698 0.1870171 0.002177683 0.0378919 0.04272065 0.1551478 0.000322688 0.01165307 0.03063473 0.09154431 0.124385 0.1924415 0.002118371 
## 
## solution.w:
##  0.0007482621 0.000574529 0.0007310453 0.0006926806 0.0004745679 0.6992787 0.0003622679 0.004165703 0.0002707058 0.0008695275 0.0001202802 0.0006295071 0.0009954334 0.0002373097 0.0006563929 0.0009364881 0.0004990263 0.0001586952 0.003468472 0.0007283658 0.0003691156 0.0004353217 0.0009718793 1.90846e-05 0.003869655 0.2453345 0.0001987037 0.0006519033 0.0006003932 0.005186614 0.0002819425 0.0004318697 0.0005134759 0.0003783307 0.000337196 0.0004705881 0.004717609 0.0002538409 0.00266648 0.01406326 0.0009216513 0.0007283588
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
## • `w.weight` -> `w.weight...43`

Placebo Gaps, MSPE Plot, & P-Value with All Control States

df_synthAZ_plot <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions, synth_AZ_median_contributions),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol <- mspe.test(placebos, discard.extreme = FALSE)

ratio_allcontrol$p.val
## [1] 0.1136364
pre_mspe_controlstates <- placebos$mspe.placs

pre_mspe_controlstates$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27","28","29","30",
                                 "31","32","33","34","35","36","37","38","39","40",
                                 "41","42","43","44")

pre_mspe_controlstates <- pre_mspe_controlstates %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe <- data.frame(pre_mspe = as.numeric(placebos$loss.v), unit = "Y1")

pre_mspe_data <- bind_rows(pre_mspe_controlstates, AZ_pre_mspe)

mspe_allcontrol_data <- ratio_allcontrol$test

mspe_allcontrol_data <- mspe_allcontrol_data %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

mspe_plot<- ggplot(mspe_allcontrol_data, aes(x = MSPE.ratios, fill = type))  +
  geom_histogram(color = "black", position = "stack") +
  scale_fill_manual(values = c("AZ" = "black", "control units" = "white")) +
  scale_x_continuous(labels = label_number()) +  # <- disables scientific notation
  labs(
    x = "\nPost/Pre-Treatment MSPE\n",
    y = "\nFrequency\n") +
  annotate("text", x = 85, y = 9.5, label = "Arizona", hjust = 0, size = 3.5, family = "Times New Roman") +
  annotate("segment",
           x = 111, xend = 111,
           y = 9, yend = 1.2,
           arrow = arrow(length = unit(0.25, "cm")),
           linewidth = 0.25,
           color = "black") + 
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = -0.5),
        plot.margin = unit(c(1, 3, 0, 0), "lines"))


mspe_plot
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggsave(
  filename = "MSPEPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = mspe_plot,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
placebo_gaps_data <- placebos$df

## 1. synthetic values in long form
synthetic_long <- placebo_gaps_data %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

## 2. actual (observed) values in long form
actual_long <- placebo_gaps_data %>% 
  select(year, all_of(unique(synthetic_long$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

## join & compute gap (synthetic – actual)
placebo_gaps_data_long <- left_join(actual_long, synthetic_long,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       # ← sign fixed here
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long <- inner_join(placebo_gaps_data_long, pre_mspe_data, by = "unit")

placebo_plot_allcontrol <- ggplot(placebo_gaps_data_long,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.114.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol

ggsave(
  filename = "PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Placebo Gaps & P-Value with Control States with MSPE < 10 times AZ in Pre-Treatment Period

ratio_10mspecontrol <- mspe.test(placebos, discard.extreme = TRUE, mspe.limit = 10)
ratio_10mspecontrol$p.val
## [1] 0.1162791
placebo_gaps_data_long %>%
  summarize(n_mspe10 = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10
##      <dbl>
## 1       42
placebo_plot_mspe10 <- ggplot(data = filter(placebo_gaps_data_long, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than Arizona's. Associated\np-value is approximately 0.116.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0, lineheight = 0.8),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10

ggsave(
  filename = "PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Placebo Gaps, MSPE Plot, & P-Value with Control States with MSPE < 5 times AZ in Pre-Treatment Period

ratio_5mspecontrol <- mspe.test(placebos, discard.extreme = TRUE, mspe.limit = 5)
ratio_5mspecontrol$p.val
## [1] 0.1190476
placebo_gaps_data_long %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      41
placebo_plot_mspe5 <- ggplot(data = filter(placebo_gaps_data_long, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than Arizona's. Associated\np-value is apprximately 0.119.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5

ggsave(
  filename = "PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Placebo Gaps & P-Value with Control States with MSPE < 2 times AZ in Pre-Treatment Period

ratio_2mspecontrol <- mspe.test(placebos, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol$p.val
## [1] 0.1315789
placebo_gaps_data_long %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      37
placebo_plot_mspe2 <- ggplot(data = filter(placebo_gaps_data_long, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than Arizona's. Associated\np-value is approximately 0.132.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2

ggsave(
  filename = "PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Diagnostics

Alternate Pre-Treatment Outcome Lags

All Pre-Treatment Outcome Lags

Prepare Data (All Lags)

First, I use the dataprep() function from the Synth package to prepare the data for input into the synth() function.

foo is the dataframe with the panel data, predictors are the variables that will be used to construct the synthetic control.

data_prep_out_all_lags <- dataprep(
  # This is the main data frame that contains the panel data.
  foo = ds_state_slim,
  
  # These are the time-invariant predictors to match treated and control units on.
  # The values for these variables will be aggregated over the years defined in
  # `time.predictors.prior` using the default aggregation function (mean).
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues", 
                 "median_assets_mil", "median_liabilities_mil"),
  
  # These are time-specific predictors — median_contributions measured in specific years
  # prior to treatment. Each entry includes the variable name, the year to extract, 
  # and the aggregation function (median, in this case).
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median")),
    list("median_contributions", 2017, c("median")),
    list("median_contributions", 2018, c("median"))),
  
  # This is the dependent variable to be tracked over time and used to calculate
  # treatment effects (Y_it). In this case, it’s median contributions by state-year.
  dependent = "median_contributions",
  
  # This identifies the column in the dataset that contains the unit (state) IDs.
  unit.variable = "state_id",
  
  # This identifies the column in the dataset that contains the time (year) variable.
  time.variable = "year",
  
  # This specifies which unit received the treatment. Here, state 4 is the treated unit.
  treatment.identifier = 3,
  
  # These are the control units. This line selects all state IDs except the treated one
  # to be used as potential donor pool units in the synthetic control.
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  
  # These are the years over which the predictor values are aggregated for the variables
  # listed in `predictors`. Typically, these are the pre-treatment years.
  time.predictors.prior = 2013:2018,
  
  
  # These are the years over which the synthetic control algorithm will optimize the
  # weights (to minimize pre-treatment root mean square prediction error).
  time.optimize.ssr = 2013:2018,
  
  # These are the full range of years to be plotted in the final output. They typically
  # span from pre-treatment to post-treatment.
  time.plot = 2013:2023,
  
  # This specifies the column that contains the names of the units (states),
  # which will be used for labeling in plots and summaries.
  unit.names.variable = "state")

Generate Weights (All Lags)

synth_out_all_lags <- synth(
  data.prep.obj = data_prep_out_all_lags)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12280124 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.150454 0.1517189 0.04400941 0.2422354 0.2292231 0.1823592 
## 
## solution.w:
##  4.51e-08 5.2e-08 8.09e-08 4.78e-08 8.99e-08 0.1222454 1.48e-08 9.86e-08 1.044e-07 1.063e-07 7.52e-08 3.24e-08 5.92e-08 6.35e-08 5.63e-08 5.43e-08 9.72e-08 6.23e-08 1.196e-07 1.646e-07 2.16e-08 3.73e-08 2.77e-08 1.78e-08 1.351e-07 9.8802e-06 1.704e-07 4.83e-08 7.9e-08 0.2894695 3.66e-08 1.043e-07 4.14e-08 4.93e-08 2.616e-07 1.181e-07 0.3455168 6.23e-08 7e-10 2.639e-07 3.83e-08 4.21e-08 0.2427554

Multiply the control units outcome matrix by the synthetic control weights column to get the synthetic control unit’s outcome data.

data_prep_out_all_lags$Y0 %*% synth_out_all_lags$solution.w
##      w.weight
## 2013 222646.3
## 2014 223036.3
## 2015 229154.0
## 2016 234730.5
## 2017 235632.9
## 2018 233170.4
## 2019 189499.9
## 2020 251851.0
## 2021 308497.0
## 2022 348434.4
## 2023 358426.0

Generate Tables for Arizona v. Synthetic Control v. All Other States (Al Lags)

Check to see the comparison of the predictors in the pre-treatment and post-treatment periods.

real_AZ_predictors_all_lags <- data_prep_out_all_lags$X1
synth_AZ_predictors_all_lags <- data_prep_out_all_lags$X0 %*% synth_out_all_lags$solution.w

real_AZ_predictors_ds_all_lags <- as.data.frame(real_AZ_predictors_all_lags)

synth_AZ_predictors_ds_all_lags <- as.data.frame(synth_AZ_predictors_all_lags)

predictors_comparison_all_lags <- cbind(real_AZ_predictors_ds_all_lags, synth_AZ_predictors_ds_all_lags)
# Create labels for each column
colnames(real_AZ_predictors_ds_all_lags) <- "Arizona"
colnames(synth_AZ_predictors_ds_all_lags) <- "Synthetic Arizona"

# Average of all control states (not weighted)
avg_controls_all_lags <- as.data.frame(rowMeans(data_prep_out_all_lags$X0))
colnames(avg_controls_all_lags) <- "Average of All Other States"

# Recalculate without formatting:
predictor_table_all_lags <- cbind(real_AZ_predictors_ds_all_lags, synth_AZ_predictors_ds_all_lags, avg_controls_all_lags)
rownames(predictor_table_all_lags) <- rownames(data_prep_out_all_lags$X1)
predictor_table_all_lags <- as.data.frame(predictor_table_all_lags)

# Keep as numeric and round
predictor_table_all_lags[] <- lapply(predictor_table_all_lags, function(x) round(as.numeric(x), 2))
class(predictor_table_all_lags)
## [1] "data.frame"
# Format copy
predictor_table_fmt_all_lags <- predictor_table_all_lags

# Identify proportion and employment rows
proportion_rows_all_lags <- grep("^prop_", rownames(predictor_table_fmt_all_lags))

# Everything else = dollar values
dollar_rows_all_lags <- setdiff(rownames(predictor_table_fmt_all_lags), c(rownames(predictor_table_fmt_all_lags)[proportion_rows_all_lags]))

# Format accordingly
predictor_table_fmt_all_lags[proportion_rows_all_lags, ] <- round(predictor_table_fmt_all_lags[proportion_rows_all_lags, ], 3)

# Add commas to dollar values (convert to character for presentation)
predictor_table_fmt_all_lags[dollar_rows_all_lags, ] <- lapply(predictor_table_fmt_all_lags[dollar_rows_all_lags, ], function(x) format(x, big.mark = ",", scientific = FALSE))

predictor_table_fmt_all_lags <- predictor_table_fmt_all_lags %>%
  tibble::rownames_to_column(var = "Predictor")

predictor_table_fmt_all_lags <- predictor_table_fmt_all_lags %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    
    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",

    "special.median_contributions.2013" = "Median Contributions - 2013 ($)",
    "special.median_contributions.2014" = "Median Contributions - 2014 ($)",
    "special.median_contributions.2015" = "Median Contributions - 2015 ($)",
    "special.median_contributions.2016" = "Median Contributions - 2016 ($)",
    "special.median_contributions.2017" = "Median Contributions - 2017 ($)",
    "special.median_contributions.2018" = "Median Contributions - 2018 ($)"
  ))


# Generate the formatted table
datasummary_df(
  predictor_table_fmt_all_lags,
  title = "Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States\nAll Pre-Treatment Outcome Lags",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AllLags_PreTreatmentPredictorComparisons.docx")
## NULL

Weights of Predictor Variables in Selecting Synthetic Weights (All Lags)

# Step 1: Create named table
v_weights_all_lags <- synth_out_all_lags$solution.v
predictor_names_all_lags <- rownames(data_prep_out_all_lags$X1)

v_weight_table_all_lags <- data.frame(
  Predictor = predictor_names_all_lags,
  Weight = as.numeric(v_weights_all_lags)
)

# Step 2: Format decimal places (e.g., 3 decimal places for proportions)
v_weight_table_all_lags$Weight <- round(v_weight_table_all_lags$Weight, 3)

# Step 3: Recode predictor names for presentation
v_weight_table_all_lags <- v_weight_table_all_lags %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    
    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",

    "special.median_contributions.2015" = "Median Contributions - 2013 ($)",
    "special.median_contributions.2016" = "Median Contributions - 2014 ($)",
    "special.median_contributions.2017" = "Median Contributions - 2015 ($)",
    "special.median_contributions.2018" = "Median Contributions - 2016 ($)",
    "special.median_contributions.2017" = "Median Contributions - 2017 ($)",
    "special.median_contributions.2018" = "Median Contributions - 2018 ($)"
  ))

# Step 4: Export using datasummary_df
datasummary_df(
  v_weight_table_all_lags,
  title = "Predictor Variable Weights in Synthetic Control Optimization\nAll Pre-Treatment Outcome Lags",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AllLags_PredictorWeights.docx"
)
## NULL
datasummary_df(
  v_weight_table_all_lags,
  title = "Predictor Variable Weights in Synthetic Control Optimization\nAll Pre-Treatment Outcome Lags",
  fmt = "%.3f",
  output = "markdown")
Predictor Variable Weights in Synthetic Control Optimization All Pre-Treatment Outcome Lags
Predictor Weight
Proportion: Arts Orgs 0.000
Proportion: Education Orgs 0.000
Proportion: Environmental Orgs 0.000
Proportion: Health Orgs 0.000
Proportion: Human Services Orgs 0.000
Proportion: International Orgs 0.000
Proportion: Societal Benefit Orgs 0.000
Proportion: Religious Orgs 0.000
Median Total Revenue ($) 0.000
Median Total Assets ($M) 0.000
Median Total Liabilities ($M) 0.000
special.median_contributions.2013 0.150
special.median_contributions.2014 0.152
Median Contributions - 2013 ($) 0.044
Median Contributions - 2014 ($) 0.242
Median Contributions - 2015 ($) 0.229
Median Contributions - 2016 ($) 0.182

State Weights in Synthetic Arizona (All Lags)

# Vector of full state names ordered by state_id
state_fullnames <- c("Alabama", "Arkansas", 
                     "Arizona", "California", "Connecticut", 
                     "Florida", "Hawaii", "Iowa", 
                     "Idaho", "Illinois", "Indiana", "Kansas", 
                     "Kentucky", "Louisiana", "Maryland", 
                     "Maine", "Michigan", "Missouri", 
                     "Mississippi", "Montana", "North Carolina", 
                     "North Dakota", "Nebraska", "New Hampshire", 
                     "New Jersey", "New Mexico", "Nevada", 
                     "New York", "Ohio",
                     "Oklahoma", "Oregon", "Pennsylvania", 
                     "Rhode Island", "South Carolina", "South Dakota", 
                     "Tennessee", "Texas", "Utah", 
                     "Virginia", "Vermont", "Washington", 
                     "Wisconsin", "West Virginia", "Wyoming")

# Apply full state names to rownames, excluding Arizona (state_id = 3)
rownames(synth_out_all_lags$solution.w) <- state_fullnames[-3]

# Create weights data frame
synth_weights_all_lags <- data.frame(
  State = rownames(synth_out_all_lags$solution.w),
  Weight = round(as.numeric(synth_out_all_lags$solution.w), 4)
)

# Sort alphabetically
synth_weights_all_lags <- synth_weights_all_lags[order(synth_weights_all_lags$State), ]

# Split into 2 columns for layout
n_all_lags <- floor(nrow(synth_weights_all_lags) / 2)

# Compute the number of rows in each column (adjust if odd total)
len1_all_lags <- n_all_lags
len2_all_lags <- nrow(synth_weights_all_lags) - n_all_lags

# Fill shorter half with NAs
State_1_all_lags <- c(synth_weights_all_lags$State[1:len1_all_lags], rep(NA, len2_all_lags - len1_all_lags))
Weight_1_all_lags <- c(synth_weights_all_lags$Weight[1:len1_all_lags], rep(NA, len2_all_lags - len1_all_lags))
State_2_all_lags <- synth_weights_all_lags$State[(len1_all_lags + 1):nrow(synth_weights_all_lags)]
Weight_2_all_lags <- synth_weights_all_lags$Weight[(len1_all_lags + 1):nrow(synth_weights_all_lags)]

# Combine into data frame
weights_table_all_lags <- data.frame(State_1_all_lags, Weight_1_all_lags, State_2_all_lags, Weight_2_all_lags)


# Display and export
library(modelsummary)

datasummary_df(
  weights_table_all_lags,
  title = "State Weights in the Synthetic Arizona\nAll Pre-Treatment Outcome Lags",
  fmt = "%.3f",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AllLags_SyntheticAZWeights.docx")
## NULL
datasummary_df(
  weights_table_all_lags,
  title = "State Weights in the Synthetic Arizona\nAll Pre-Treatment Outcome Lags",
  fmt = "%.3f",
  output = "markdown")
State Weights in the Synthetic Arizona All Pre-Treatment Outcome Lags
State_1_all_lags Weight_1_all_lags State_2_all_lags Weight_2_all_lags
Alabama 0.000 New Hampshire 0.000
Arkansas 0.000 New Jersey 0.000
California 0.000 New Mexico 0.000
Connecticut 0.000 New York 0.000
Florida 0.000 North Carolina 0.000
Hawaii 0.122 North Dakota 0.000
Idaho 0.000 Ohio 0.000
Illinois 0.000 Oklahoma 0.000
Indiana 0.000 Oregon 0.289
Iowa 0.000 Pennsylvania 0.000
Kansas 0.000 Rhode Island 0.000
Kentucky 0.000 South Carolina 0.000
Louisiana 0.000 South Dakota 0.000
Maine 0.000 Tennessee 0.000
Maryland 0.000 Texas 0.000
Michigan 0.000 Utah 0.345
Mississippi 0.000 Vermont 0.000
Missouri 0.000 Virginia 0.000
Montana 0.000 Washington 0.000
Nebraska 0.000 West Virginia 0.000
Nevada 0.000 Wisconsin 0.000
NA Wyoming 0.243

The synthetic state is a combination of CA, DE, HI, ID, NY, & OR.

Plot Actual v. Synthetic AZ Contributions Trend (All Lags)

synthetic_AZ_all_lags <- data_prep_out_all_lags$Y0 %*% synth_out_all_lags$solution.w

#Create the data for real and synthetic AZ median contributions
years <- 2013:2023
real_AZ_median_contributions_all_lags <- as.numeric(data_prep_out_all_lags$Y1)
synth_AZ_median_contributions_all_lags <- as.numeric(data_prep_out_all_lags$Y0 %*% synth_out_all_lags$solution.w)

#Combine this data into a dataframe
df_synthAZ_plot_all_lags <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions_all_lags, synth_AZ_median_contributions_all_lags),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

# Plot using ggplot
synth_control_plot_AZ_all_lags <- ggplot(df_synthAZ_plot_all_lags, aes(x = year, y = value, color = group, linetype = group)) +
  geom_line(size = 1) +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  
  # Add annotation text and arrow pointing to the policy adoption line
  annotate("text",
           x = 2017.75, y = 75000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = 75000,
           yend = 75000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +

  # Format y-axis in thousands with dollar sign
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(0, 750000)) +

  # Ensure every year is shown on the x-axis
  scale_x_continuous(breaks = seq(min(df_synthAZ_plot_all_lags$year), max(df_synthAZ_plot_all_lags$year), by = 1)) +

  # Match line styles and color
  scale_linetype_manual(values = c("Arizona" = "solid", "Synthetic Arizona" = "dashed"), name = NULL) +
  scale_color_manual(values = c("Arizona" = "black", "Synthetic Arizona" = "black"), name = NULL) +

  # Axis labels and legend titles
  labs(
    x = "\nYear\n",
    y = "\nMedian Contributions to Nonprofits in Arizona\n") +

  # Theme and legend customization
  theme_classic(base_family = "Times New Roman") +
  theme(
    # Add plot borders on all sides
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.margin = unit(c(1,3,0,0), "lines"),
    
    # Move legend to bottom right and put it in a box
    legend.position = c(0.95, 0.05),
    legend.justification = c("right", "bottom"),
    legend.background = element_rect(color = "black", fill = "white", size = 0.5),
    
    # Optional tweaks for readability
    legend.title = element_text(size = 8),
    legend.text = element_text(size = 8),
    legend.key.width = unit(1.5, "cm")
  )

synth_control_plot_AZ_all_lags

grid.arrange(synth_control_plot_AZ, synth_control_plot_AZ_all_lags, ncol = 1)

ggsave(
  filename = "AllLags_SynthControlPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_plot_AZ_all_lags,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)

Plot the Gaps in Arizon Contributions (All Lags)

synthAZ_gaps_all_lags <- real_AZ_median_contributions_all_lags - synth_AZ_median_contributions_all_lags

df_synthAZ_gaps_all_lags <- data.frame(
  year = years,
  gap = synthAZ_gaps_all_lags)

synth_control_gapsplot_AZ_all_lags <- ggplot(df_synthAZ_gaps_all_lags, aes(x = year, y = gap)) +
  geom_line(size = 1) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  
  # Add annotation text and arrow pointing to the policy adoption line
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +

  # Format y-axis in thousands with dollar sign
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +

  # Ensure every year is shown on the x-axis
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_all_lags$year), max(df_synthAZ_gaps_all_lags$year), by = 1)) +

  # Axis labels and legend titles
  labs(
    x = "\nYear\n",
    y = "\nGap in Median Contributions to Arizona Nonprofits\n") +

  # Theme and legend customization
  theme_classic(base_family = "Times New Roman") +
  theme(
    # Add plot borders on all sides
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.margin = unit(c(1,3,0,0), "lines"))

synth_control_gapsplot_AZ_all_lags

grid.arrange(synth_control_gapsplot_AZ, synth_control_gapsplot_AZ_all_lags, ncol = 1)

ggsave(
  filename = "AllLags_SynthControlGapsPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_gapsplot_AZ_all_lags,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)

Generate Arizona v. Synth. Arizona Median Contributions Comparison Table (All Lags)

# Create and format table with dollar signs and commas
contributions_comparison_all_lags <- data.frame(
  Year = years,
  `Arizona (Observed)` = paste0("$", format(round(real_AZ_median_contributions_all_lags, 0), big.mark = ",")),
  `Synthetic Arizona` = paste0("$", format(round(synth_AZ_median_contributions_all_lags, 0), big.mark = ",")),
  `Difference` = paste0("$", format(round(real_AZ_median_contributions_all_lags - synth_AZ_median_contributions_all_lags, 0), big.mark = ",", scientific = FALSE))
)

datasummary_df(
  contributions_comparison_all_lags,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023)\nAll Pre-Treatment Outcome Lags",
  output = "markdown")
Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023) All Pre-Treatment Outcome Lags
Year Arizona..Observed. Synthetic.Arizona Difference
2013.00 $221,674 $222,646 $ -972
2014.00 $224,441 $223,036 $ 1,405
2015.00 $228,778 $229,154 $ -376
2016.00 $230,771 $234,730 $-3,959
2017.00 $243,045 $235,633 $ 7,412
2018.00 $233,232 $233,170 $ 61
2019.00 $204,474 $189,500 $14,974
2020.00 $267,790 $251,851 $15,940
2021.00 $315,455 $308,497 $ 6,958
2022.00 $433,461 $348,434 $85,027
2023.00 $451,676 $358,426 $93,250
datasummary_df(
  contributions_comparison_all_lags,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023)\nAll Pre-Treatment Outcome Lags",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AllLags_ZObservedVsSynthetic.docx"
)
## NULL
rownames(synth_out_all_lags$solution.w)
##  [1] "Alabama"        "Arkansas"       "California"     "Connecticut"   
##  [5] "Florida"        "Hawaii"         "Iowa"           "Idaho"         
##  [9] "Illinois"       "Indiana"        "Kansas"         "Kentucky"      
## [13] "Louisiana"      "Maryland"       "Maine"          "Michigan"      
## [17] "Missouri"       "Mississippi"    "Montana"        "North Carolina"
## [21] "North Dakota"   "Nebraska"       "New Hampshire"  "New Jersey"    
## [25] "New Mexico"     "Nevada"         "New York"       "Ohio"          
## [29] "Oklahoma"       "Oregon"         "Pennsylvania"   "Rhode Island"  
## [33] "South Carolina" "South Dakota"   "Tennessee"      "Texas"         
## [37] "Utah"           "Virginia"       "Vermont"        "Washington"    
## [41] "Wisconsin"      "West Virginia"  "Wyoming"

Hypothesis Testing

placebos_all_lags <- generate.placebos(
  dataprep.out = data_prep_out_all_lags,
  synth.out = synth_out_all_lags,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 309037.3 
## 
## solution.v:
##  3.765e-06 9.6e-09 2.36954e-05 9.6e-08 6.9e-08 1.0694e-06 6.06e-07 7.95e-07 6.236e-07 1.0505e-06 3.473e-07 0.1574631 0.1477101 0.1659022 0.1872583 0.1588589 0.1827754 
## 
## solution.w:
##  5.52577e-05 7.4783e-05 7.04119e-05 6.31795e-05 3.92757e-05 4.5112e-06 3.85337e-05 3.59201e-05 0.0001585816 5.32555e-05 5.18384e-05 0.1784666 4.93005e-05 0.000117196 7.88865e-05 0.02551276 0.1191569 4.89288e-05 6.10725e-05 3.31709e-05 6.77315e-05 5.23905e-05 0.4314441 3.46076e-05 4.85751e-05 8.45464e-05 8.76846e-05 6.5806e-05 4.934e-07 5.65884e-05 8.14254e-05 0.0001061274 3.82015e-05 0.008194801 4.08757e-05 0.05978406 6.76534e-05 7.13797e-05 3.3623e-05 0.0001127886 0.1753285 2.75914e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1772111 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1884769 0.1732355 0.1293003 0.1398214 0.1917716 0.1773944 
## 
## solution.w:
##  8.586e-07 4.922e-07 1.3611e-06 6.708e-07 3.965e-07 2.35218e-05 4.704e-07 3.48079e-05 5.919e-07 0.6065281 1.1021e-06 4.159e-07 1.3277e-06 7.736e-07 5.938e-07 5.263e-07 2.0408e-06 0.01442642 6.661e-07 0.2435282 0.1115344 1.247e-06 2.5e-09 0.02389528 7.933e-07 6.575e-07 8.177e-07 8.122e-07 3.832e-07 2.86e-08 1.0777e-06 5.639e-07 7.94e-07 4.124e-07 1.0316e-06 2.69e-07 3.2311e-06 4.868e-07 5.917e-07 1.7343e-06 1.5139e-06 5.607e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2183.862 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1246494 0.1997687 0.1018819 0.1404143 0.2118113 0.2214743 
## 
## solution.w:
##  0.001710808 0.001322317 0.002047438 0.003247965 0.01018619 0.0008926715 0.002067082 0.002039426 0.003734126 0.001237551 0.00129231 0.00210812 0.001545438 0.003069194 0.002278212 0.003426093 0.001653285 0.00284534 0.002716003 0.001298348 0.001795294 0.001505718 0.001255329 0.002043951 0.002340477 0.005837824 0.002040874 0.1661986 0.2491566 0.001472901 0.001600502 0.006607663 0.001333024 0.004494992 0.003478208 0.150869 0.002199068 0.1775389 0.004463643 0.001354509 0.001197325 0.1604977 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3158337 
## 
## solution.v:
##  4.595e-07 3.7671e-06 6.458e-07 1.74e-07 0.0002988592 4.2083e-06 0.004726325 1.2637e-06 3.18e-07 4.974e-07 3.939e-07 0.1573806 0.157954 0.1658347 0.1690144 0.1620128 0.1827666 
## 
## solution.w:
##  4.96366e-05 1.16491e-05 5.5103e-06 2.14636e-05 2.0126e-06 0.001180478 4.163e-06 6.1284e-06 1.66071e-05 8.8506e-06 1.18912e-05 9.8271e-06 8.2075e-06 1.25685e-05 1.94535e-05 8.32865e-05 1.56543e-05 8.1459e-06 7.7597e-06 0.1946774 4.2564e-05 0.2643408 0.2654919 0.0750687 2.01284e-05 6.0867e-06 1.7706e-05 5.403e-07 5.1058e-06 1.0585e-05 2.43716e-05 9.95258e-05 8.6684e-06 6.47946e-05 6.633e-06 0.1984539 1.4482e-05 4.0768e-06 7.7977e-06 8.9808e-05 6.05765e-05 5.215e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 68.8718 
## 
## solution.v:
##  6.7e-09 2.37308e-05 5.72e-08 2.2637e-06 1.5331e-06 1.0457e-06 2.099e-07 2.32e-08 0.01361293 2.602e-07 1.4713e-06 0.1574074 0.1476494 0.1658832 0.1690517 0.1636004 0.1827644 
## 
## solution.w:
##  0.001999385 0.001886001 0.004459194 0.1584912 0.002981094 1.0349e-06 0.002004464 0.006425428 0.003766349 0.001812113 0.001781613 0.002818511 0.006013979 0.007240003 0.086116 0.005040318 0.0019315 0.002919355 0.003675014 0.083325 0.00200071 3.54147e-05 0.000253396 0.02479977 0.001453668 0.006924375 0.003753199 0.003447453 0.001147989 0.002107863 0.004986764 0.00113092 0.002699263 0.004405583 0.00482333 0.07058952 0.002770149 0.3737864 0.09841151 0.002331868 0.002149377 0.001303887 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30657628 
## 
## solution.v:
##  0.001284956 9.03237e-05 0.006248053 0.0198817 1.24e-08 0.2892499 4.29909e-05 0.006667193 8.507e-07 0.07384429 8.3401e-06 0.09427384 0.1574433 0.1570603 0.1065139 0.0356477 0.05174238 
## 
## solution.w:
##  5.8056e-06 4.5793e-06 1.14559e-05 3.1616e-05 1.2476e-05 7.617e-06 1.48635e-05 1.85447e-05 1.24491e-05 5.3298e-06 9.5945e-06 2.28198e-05 1.33197e-05 8.49492e-05 1.48303e-05 1.13431e-05 5.5455e-06 7.4651e-06 1.00813e-05 4.24601e-05 7.4772e-06 1.3936e-05 4.8432e-06 5.0362e-06 3.8e-09 0.2345831 1.29297e-05 1.11073e-05 1.31794e-05 1.48856e-05 2.56437e-05 7.9003e-06 7.69835e-05 8.0882e-06 1.02865e-05 0.2010743 6.0812e-06 0.0001019419 2.15858e-05 9.4264e-06 8.3282e-06 0.5636358 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056480 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1351467 0.2616487 0.1907451 0.1581103 0.0861673 0.1681818 
## 
## solution.w:
##  1.17e-08 1.13e-08 2.3e-09 8.1e-09 4.2e-09 1e-09 2.9e-09 4.2e-09 4e-09 1.46e-08 1.95e-08 6.7e-09 1e-08 5.5e-09 6.7e-09 4.8e-09 8.8e-09 3.3e-09 3.9e-09 1.27e-08 4.5e-09 9.6e-09 0.9999997 3.7e-09 7e-10 2.8e-09 8.1e-09 3.1e-09 3e-09 9.9e-09 9.2e-09 4.2e-09 1.44e-08 2.9e-09 3.1e-09 2e-10 5.9e-09 3.2e-09 1.8e-09 1.67e-08 2.49e-08 5e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16603113 
## 
## solution.v:
##  0.0001032096 3.80805e-05 8.8605e-06 8.091e-06 2.1785e-05 0.0004592357 0.0002283279 0.0001202155 6.91508e-05 0.0005022494 0.002384044 0.1804019 0.1476416 0.1683401 0.1732433 0.1307496 0.1956803 
## 
## solution.w:
##  6.481e-07 1.2137e-06 1.165e-06 4.604e-07 6.786e-07 3.576e-07 3.284e-07 9.14e-07 1.7642e-06 5.8414e-06 5.942e-07 0.1492706 0.01736978 4.142e-07 3.0953e-06 1.0771e-06 8.149e-07 7.204e-07 2.78762e-05 2.633e-07 3.048e-07 2.896e-07 2.166e-07 3.9787e-06 3.2764e-06 9.047e-07 4.779e-07 2.45e-07 0.141175 4.765e-07 7.4029e-06 2.40505e-05 1.8321e-06 0.04276795 2.39e-07 0.0006386193 6.457e-07 2.3e-09 0.6486838 6.442e-07 9.792e-07 1e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8327805 
## 
## solution.v:
##  0.009335218 3.5586e-06 3.0301e-06 0.0001475086 6.789e-06 3.197e-07 1.7867e-06 2.34714e-05 5.761e-07 0.0001332607 3.89777e-05 0.1647903 0.1478622 0.1660869 0.169485 0.1593865 0.1826947 
## 
## solution.w:
##  9.737e-07 0.03928264 8.78e-07 1.1494e-06 1.1077e-06 9.777e-07 9.264e-07 9.002e-07 9.698e-07 7.557e-07 1.193e-06 5.301e-07 0.2695854 1.3833e-06 1.0784e-06 8.003e-07 1.1258e-06 1.0766e-05 1.1292e-06 0.1652286 0.02969687 1.5868e-06 2.283e-06 0.188801 1.1707e-06 1.0884e-06 1.4566e-06 2.9651e-06 7.344e-07 3.3962e-06 8.253e-07 1.2678e-06 5.898e-07 5.55e-07 1.73189e-05 2e-10 0.0002504797 9.602e-07 1.4389e-06 9.738e-07 6.909e-07 0.3070891 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 433.2158 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.08598624 0.1074503 0.09147853 0.4580459 0.06546167 0.1915774 
## 
## solution.w:
##  0.008264738 0.003636508 0.006510997 0.004150708 0.004447146 0.003357568 0.002227769 0.003184227 0.002376005 8.888e-06 0.002528976 0.005307901 0.002063077 0.007872572 0.004639156 0.04956515 0.01228994 0.004820474 0.005343056 0.001969334 0.00859604 0.00314758 0.1660284 0.002607565 0.134823 0.009600358 0.004808296 0.006105732 0.3298279 0.003229237 0.00528576 0.06583494 0.00255904 0.03052455 0.003261985 0.06965954 1.09251e-05 0.005726482 0.003214492 0.004000497 0.00372538 0.00285813 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 33983991 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.3330753 0.2386182 0.2165492 0.005335611 0.02648825 0.1799335 
## 
## solution.w:
##  3.42e-08 0.884401 1.23e-08 2.09e-08 1.6e-08 7.3e-09 1.2976e-06 1.62e-08 1.59e-08 2.05e-08 3.06e-08 2.1e-08 4.84e-08 1.91e-08 2.25e-08 2.58e-08 3.5e-09 1.2e-08 2.07e-08 1.3e-08 3.89e-08 2.09e-08 0 2.25e-08 1e-09 1.43e-08 2.42e-08 1.28e-08 1.62e-08 2.62e-08 0.1155969 1.97e-08 2.41e-08 2.03e-08 1.31e-08 9.2e-09 3.5e-08 1.34e-08 1.13e-08 3.88e-08 3.31e-08 6.4e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 489140.9 
## 
## solution.v:
##  0.0002690031 0.0001934373 0.0001818613 7.6226e-06 1.70432e-05 6.5672e-06 8.8392e-06 3.0343e-06 2.828e-07 5.0626e-06 1.77745e-05 0.158046 0.1481909 0.1665399 0.1834557 0.159602 0.183455 
## 
## solution.w:
##  0.0001387324 2.31017e-05 0.0001591525 0.0001207632 0.0001960021 0.0002077065 0.2121924 0.0004049286 0.0001197794 0.0001151295 1.36e-08 0.002315122 0.1948647 0.0003767432 0.001078159 0.000114373 3.27691e-05 5.43212e-05 0.0001094509 0.1601511 0.0001334809 0.001337782 0.1584314 3.46982e-05 1.94995e-05 9.82047e-05 0.001389565 0.0002061444 0.001492925 7.45e-07 2.61036e-05 0.0002723291 0.2624789 6.62552e-05 0.0001837455 2.95882e-05 0.000114928 0.0006238026 0.0001032639 7.3536e-05 3.97263e-05 6.87425e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19234899 
## 
## solution.v:
##  0.0004386295 1.86374e-05 8.22705e-05 0.0002188816 0.003730171 0.000669628 0.0001484627 7.949e-06 5.9453e-06 0.0005164708 0.0002351401 0.1568709 0.1487102 0.1706525 0.1723207 0.1615667 0.1838068 
## 
## solution.w:
##  1.5248e-06 1.115e-07 2.974e-07 2.872e-07 3.878e-07 8.17e-08 3.58e-08 7.231e-07 8.67e-08 5.587e-07 1.941e-07 6.98e-08 1.148e-07 2.487e-07 0.3269924 1.4137e-05 2.536e-07 1.078e-07 3.439e-07 3.97e-08 9.62e-08 7.02e-08 5.52e-08 1.669e-07 1.55e-08 1.93e-07 1.999e-07 1.239e-07 0.2020827 7.54e-08 6.588e-07 9.36e-07 0.3345789 5.54707e-05 1.131e-07 0.1362649 1.06e-07 2.841e-07 1.567e-07 3.22e-07 2.4198e-06 1.62e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9949682 
## 
## solution.v:
##  0.0004909535 0.0002379802 0.001321488 5.05374e-05 0.0008483605 4.2498e-06 0.001414518 0.001749014 2.30552e-05 0.000814475 5.9483e-06 0.159242 0.1500062 0.1676587 0.1705714 0.1605528 0.1850084 
## 
## solution.w:
##  1.0315e-06 9.6363e-06 3.392e-07 1.0686e-06 6.917e-07 2.992e-07 0.1625441 0.316561 0.0385978 4.76e-07 0.178207 0.05784564 8.06e-07 1.048e-06 3.4036e-06 5.057e-07 6.287e-07 5.073e-07 5.883e-07 5.5336e-06 0.246183 6.3341e-06 7.0598e-06 5.16e-07 6.4e-08 3.638e-07 2.9469e-06 5.718e-07 3.433e-07 5.6732e-06 9.422e-07 9.363e-07 2.8494e-06 2.35e-07 8.129e-07 1.588e-07 5.08e-07 7.178e-07 5.7e-07 1.7478e-06 1.2118e-06 2.862e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 862120.7 
## 
## solution.v:
##  0.1364875 0.03292159 0.009902317 0.02184936 1.5465e-06 0.0009800773 0.06326912 0.0004877037 2.44877e-05 7.30312e-05 7.30249e-05 0.1377612 0.01711752 0.2135483 0.2019556 0.06544433 0.09810323 
## 
## solution.w:
##  1.973e-07 1.556e-07 9.6e-08 0.0938226 1.634e-07 0 2.1711e-06 5.448e-07 1.54e-07 1.292e-07 0.04594293 2.788e-07 1.896e-07 4.008e-07 1.743e-07 1.576e-07 8e-07 0.06389189 1.383e-07 6.043e-07 9.165e-07 0.03833034 0.2388193 6.7e-08 9.89e-08 5.12e-08 2.47e-07 1.326e-07 3.34e-07 3.341e-07 1.1e-09 1.2469e-06 2.4e-07 1.12e-07 1.16e-07 6.89e-08 3.177e-07 0.5191815 8.56e-08 3.876e-07 2.565e-07 7.27e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1856199 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.2249853 0.2242221 0.23255 0.02195057 0.006188648 0.2901034 
## 
## solution.w:
##  1.4018e-06 8.728e-07 9.717e-07 1.4655e-06 1.9156e-06 7.248e-07 0.2255061 0.1331065 9.401e-07 8.213e-07 7.572e-07 2.5505e-06 0.1179658 3.4228e-06 1.5516e-06 8.26e-08 7.637e-07 6.421e-07 9.888e-07 9.829e-07 6.548e-07 7.56e-08 3.6602e-06 5.926e-07 3.464e-07 7.476e-07 3.6442e-06 9.325e-07 1.2183e-06 1.2324e-06 8.477e-07 0.4088767 1.5702e-06 3.056e-07 1.0924e-06 6.525e-07 6.911e-07 0.1145019 1.128e-06 1.1875e-06 9.47e-07 5.455e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 383893.5 
## 
## solution.v:
##  0.001105338 3.75512e-05 0.0003421366 0.00274446 3.1698e-06 0.0003791205 4.037e-07 9.2088e-06 1.21435e-05 2.56182e-05 0.000244831 0.1589109 0.1587731 0.1674808 0.1695 0.1599217 0.1805096 
## 
## solution.w:
##  0.0003442577 0.0001112679 4.54006e-05 6.36614e-05 5.428e-05 2.88115e-05 0.04152791 3.48866e-05 4.00777e-05 0.0001466026 0.0003679783 0.0001444271 0.0007961096 0.000127474 9.12666e-05 0.0007151825 0.0001006029 3.57012e-05 7.18979e-05 5.67265e-05 0.0002391927 0.0001333768 0.1651305 2.65476e-05 4.7868e-06 5.07281e-05 0.0002443816 4.94888e-05 0.0001448255 0.0001024203 0.0002661464 0.1740838 8.24017e-05 0.6140419 3.9002e-05 1.499e-07 9.52796e-05 5.55014e-05 2.82134e-05 0.000135174 0.0001210537 2.05484e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7087550 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1623579 0.153089 0.172068 0.1701519 0.1590148 0.1833183 
## 
## solution.w:
##  0.0001543627 4.4e-09 5.4848e-06 6.2e-06 3.1436e-06 4.2093e-06 1.61062e-05 1.1778e-06 7.262e-07 1.20503e-05 0.2088687 1.8307e-06 4.5591e-06 1.3504e-06 9.6475e-06 2.9385e-06 9.4765e-06 0.2767417 3.1376e-06 6.75e-08 5.0681e-06 2.8102e-06 0.08767592 7.374e-07 2.92968e-05 1.76595e-05 4.8076e-06 6.6123e-06 1.12382e-05 9.1e-09 3.7406e-06 4.6701e-06 1.2753e-06 7.1165e-06 1.6395e-06 3.942e-06 6.1752e-06 3.2654e-06 1.1793e-06 1.03811e-05 0.4263553 2.522e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13476656 
## 
## solution.v:
##  0.129259 0.03743608 0.003805319 0.01743392 0.003372949 0.005737892 0.006042151 0.001971489 0.1295817 0.002793309 0.01766111 0.06690167 0.08805985 0.1526192 0.1295594 0.1139199 0.09384504 
## 
## solution.w:
##  6.8851e-06 7.8277e-06 1.7463e-06 2.6147e-06 3.9978e-06 0.01885781 4.6228e-06 1.9129e-06 8.4928e-06 6.502e-06 6.5275e-06 6.5299e-06 2.125e-06 0.005339289 0.03440332 6.189e-06 3.4238e-06 1.9277e-06 3.9007e-06 0.1632324 0.0707325 1.23875e-05 4.1487e-06 1.04398e-05 0.2236766 5.62093e-05 7.005e-06 4.3989e-06 4.7215e-06 1.06656e-05 4.2849e-06 3.2511e-06 7.0485e-06 2.9951e-06 3.3569e-06 1e-10 0.03320313 7.5384e-06 3.3207e-06 0.2024424 3.55e-08 0.2478955 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6.307046 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1878572 0.1543764 0.1044653 0.291598 0.1984688 0.06323418 
## 
## solution.w:
##  0.003376592 0.004506471 0.009916835 0.003064535 0.005664283 0.008521084 0.002079995 0.1688712 0.01400272 0.008477383 0.08751495 0.003463052 0.005192748 0.1741639 0.005316946 0.006142578 0.006072789 0.003704282 0.006663545 0.00238723 0.004617405 0.002887029 0.002596369 0.0066477 0.08500294 0.009266242 0.005177499 0.007260749 0.1656856 0.003867073 0.00510096 0.007935451 0.003755298 0.007356812 0.009990745 0.07617083 0.009486962 0.008175225 0.01118267 0.002828077 0.002630887 0.03327427 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 58862898 
## 
## solution.v:
##  3.9634e-06 1.4451e-05 1.7767e-06 6.5869e-06 5.03233e-05 8.93148e-05 1.8607e-06 5.609e-07 1.41344e-05 2.99776e-05 4.6538e-06 0.1723023 0.1481755 0.1662747 0.1700641 0.1599394 0.1830264 
## 
## solution.w:
##  8.58e-08 1.504e-07 3.92e-08 1.662e-07 5.01e-08 1.187e-07 0.1935041 2.66e-08 2.468e-07 4.08e-08 7.14e-08 4.974e-07 2.66e-08 6.44e-08 6.24e-08 3.52e-08 3.38e-08 1.8e-07 2.514e-07 4.27e-08 1.068e-07 0.6152249 2e-10 5.89e-08 2.18e-08 5.16e-08 6.34e-08 8.07e-08 2.65e-08 0.0349618 5.14e-08 3.3e-08 0.1563054 2.5e-08 9.43e-08 1.6e-08 8.32e-08 3.07e-08 3.61e-08 2.592e-07 3.47e-07 2.032e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4071409 
## 
## solution.v:
##  1.53499e-05 4.221e-06 3.23674e-05 2.13527e-05 0.009387904 1.384e-07 1.3888e-06 0.0001103495 0.008259307 5.0088e-06 4.7525e-06 0.1574661 0.1478156 0.1658425 0.1690156 0.1590858 0.1829322 
## 
## solution.w:
##  9.601e-07 1.65825e-05 9.52e-08 4.155e-07 1.799e-07 5.52e-08 1.7279e-06 1.09e-07 2.244e-07 2.288e-07 3.2e-09 6.947e-07 1.464e-07 3.198e-07 1.656e-07 2.844e-07 2.431e-07 4.738e-07 3.184e-07 2.026e-07 5.085e-07 5.943e-07 0.4739666 1.844e-07 3e-10 9.15e-08 4.394e-07 2.949e-07 9.67e-08 5.548e-07 2.777e-07 1.678e-07 2.269e-07 1.247e-07 2.026e-07 3.75e-08 0.5260048 1.3e-07 1.109e-07 5.868e-07 4.38e-07 8.46e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 188447.3 
## 
## solution.v:
##  5.1588e-06 0.0002800596 1.5588e-05 8.12362e-05 2.21829e-05 0.000138125 5.2164e-06 3.51458e-05 4.2089e-06 4.0942e-06 4.9047e-06 0.1594693 0.1511985 0.1723238 0.1708795 0.1607928 0.1847402 
## 
## solution.w:
##  0.0001073553 4.50135e-05 5.86453e-05 2.20303e-05 9.40831e-05 3.83578e-05 0.166644 5.31463e-05 4.98471e-05 6.51428e-05 3.65377e-05 0.0001263192 9.20079e-05 6.69231e-05 0.0001667105 0.04587217 7.86538e-05 4.85697e-05 4.39886e-05 5.26847e-05 0.3333603 7.37648e-05 0.2870484 2.58442e-05 1.70538e-05 5.41663e-05 0.0001403304 8.74002e-05 6.74928e-05 8.28534e-05 4.75524e-05 0.1647283 8.18452e-05 4.71971e-05 5.92164e-05 2.48736e-05 6.89916e-05 3.814e-07 4.87553e-05 8.52639e-05 6.06095e-05 2.71434e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12276442 
## 
## solution.v:
##  0.0003917527 1.10658e-05 0.00589759 0.01047045 0.06231039 0.0007659357 7.5977e-06 0.007812394 0.003911081 0.0008509547 0.001005628 0.1917147 0.1199147 0.2528208 0.1808661 0.103026 0.05822287 
## 
## solution.w:
##  3.2842e-06 1.5733e-06 1.6389e-06 3.7069e-06 4.038e-06 1.0254e-06 0.7582522 1.079e-06 2.8226e-06 1.498e-06 4.5346e-06 3.5631e-06 1.6733e-06 4.5002e-06 1.54579e-05 2.1815e-06 2.3318e-06 1.81384e-05 1.7136e-06 1.48e-06 1.02649e-05 0.241615 2.7405e-06 1.2221e-06 4.584e-07 3.0255e-06 2.4116e-06 3.1004e-06 1.46e-06 4.613e-06 1.9623e-06 5.421e-06 2.7529e-06 2.4013e-06 2.891e-06 2.999e-07 4.6531e-06 2.2775e-06 7.118e-07 2.053e-06 1.8001e-06 5.3e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29159986 
## 
## solution.v:
##  0.001973991 7.404e-06 5.47966e-05 0.00937702 0.000815444 0.002468432 0.006904792 0.001563268 0.1994291 0.006762407 0.02809688 0.25796 0.07476319 0.1025793 0.0262901 0.1355278 0.1454261 
## 
## solution.w:
##  5.273e-07 0.2411828 1.93e-07 5.307e-07 4.206e-07 1.549e-07 2.0973e-06 1.695e-07 0.03014327 2.027e-07 6.276e-07 8.623e-07 2.468e-07 1.0896e-06 4.286e-07 5.572e-07 2.525e-07 4.303e-07 2.1581e-06 3.597e-07 2.714e-07 0.09308861 6.7441e-06 6.022e-07 0.3052245 2.836e-07 5.798e-07 2.436e-07 1.538e-07 6.646e-07 0.05379855 1.9325e-06 2.854e-07 2.657e-07 1e-09 0 4.445e-07 6.277e-07 0.2765359 1.4107e-06 4.857e-07 1.173e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 167784306 
## 
## solution.v:
##  7.4712e-06 0.007267421 0.02244608 0.002212757 0.00310229 0.008295575 0.05001131 0.009997104 0.04842679 0.1078864 0.03016508 0.1651559 0.109357 0.06176211 0.1266589 0.04464487 0.202603 
## 
## solution.w:
##  9.4e-09 8.1e-09 2.4e-08 3.6e-09 1.7e-08 5.6e-09 3.3e-09 1.37e-08 1.02e-08 1.65e-08 8.2e-09 5.3e-09 9.7e-09 6.4e-09 3.4e-09 9.5e-09 1.44e-08 9.9e-09 1.29e-08 1.63e-08 3.4e-09 5.9e-09 3.3e-09 4.1e-09 0.3037794 6.9e-09 6.4e-09 2.76e-08 1.48e-08 3.5e-09 3.2e-09 1.41e-08 4.7e-09 2.551e-07 4.2e-08 0.6608287 7.9e-09 6.9e-09 2.98e-08 4.7e-09 6.6e-09 0.03539124 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2225622 
## 
## solution.v:
##  0.1617358 0.005963156 0.2000918 0.00213681 0.05964264 0.1772009 0.02206085 0.09743401 0.02753307 0.0007542126 0.02195267 0.001090598 0.06621823 0.0006358803 0.03750651 0.04737538 0.07066742 
## 
## solution.w:
##  5e-10 1e-09 0.255756 4.2e-09 8e-10 0.1530442 1.4e-09 3e-10 7.97e-08 2.5e-09 2.4e-09 9e-10 1.3e-09 1.57e-08 9e-10 3.3e-09 2.1e-09 8e-10 4e-10 1.3e-09 1e-09 1.2e-09 3.2e-09 1.3e-09 1e-09 5e-10 2e-09 7e-10 8e-10 3.8e-09 2.72e-08 6e-10 2.4e-09 7e-10 0 0.196226 0.3949736 8.8e-09 4.9e-09 1.1e-09 7e-10 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1433.357 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.2399628 0.07984378 0.1871212 0.2007373 0.2268554 0.06547945 
## 
## solution.w:
##  0.00302825 0.002479506 0.001715571 0.002241667 0.002385211 0.00143163 0.06074379 0.002823761 0.002622455 0.001839466 0.00206488 0.01764748 0.002404886 0.1071094 0.005325085 0.1380601 0.001495164 0.001866457 0.001563033 0.00188265 0.115198 0.006191222 0.01706426 0.184079 0.001041562 0.0005574122 0.001591234 0.003669133 0.2077614 0.005850304 0.001390455 5.449e-06 0.003353377 0.0008807398 0.00273744 0.0003772605 0.004073366 0.07670955 0.001391528 0.0024875 0.001716297 0.001143034 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5502966 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1482615 0.1556769 0.1742389 0.1922593 0.1485531 0.1810103 
## 
## solution.w:
##  8.6251e-06 7.1983e-06 1.6114e-05 4.32087e-05 1.62903e-05 1.42074e-05 5.9986e-06 4.6076e-06 9.7904e-06 1.15477e-05 5.0686e-06 5.5847e-06 4.7672e-06 4.4121e-06 3.3063e-06 6.9312e-06 1.10794e-05 9.9088e-06 0.00157961 6.9515e-06 0.1407903 0.060601 1.69632e-05 1.54316e-05 1.14329e-05 1.65769e-05 3.64274e-05 8.1794e-06 5.8259e-06 1.03129e-05 6.0457e-06 0.5062026 4.4318e-06 9.6796e-06 0.002489309 6.51708e-05 2.73998e-05 3.0206e-06 1.18794e-05 8.165e-06 6.3135e-06 0.2878783 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 14576302 
## 
## solution.v:
##  5.62027e-05 6.784e-07 6.64e-08 2.961e-07 4.185e-07 2.8e-09 7.671e-07 2.469e-07 3.656e-07 0.009216511 1.321e-07 0.1587619 0.1489166 0.1673088 0.1708654 0.1605455 0.1843261 
## 
## solution.w:
##  1.5815e-06 1.0492e-06 0.2672415 4.857e-07 1.4223e-06 6.539e-07 4.446e-07 0.04750577 9.009e-07 0.04266402 2.8625e-06 8.594e-07 0.1123624 2.5355e-06 1.2418e-06 3.0943e-06 9.3575e-06 1.3482e-06 9.803e-07 3.8734e-06 3.875e-07 1.0744e-06 5.713e-07 7.634e-07 5.073e-07 1e-09 3.6656e-06 1.9533e-06 2.5242e-06 8.239e-07 5.42e-07 0.05950126 5.376e-07 0.283139 1.4619e-06 1.2813e-06 2.4467e-06 0.1875314 8.859e-07 6.196e-07 5.738e-07 1.2817e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 764792.8 
## 
## solution.v:
##  2.4295e-06 2.972e-07 1.513e-07 1.872e-07 1.2656e-06 4.27e-07 6.7e-08 7.063e-07 6.9e-09 6.713e-07 5.9e-09 0.1573997 0.156777 0.1704418 0.1736023 0.1590251 0.1827479 
## 
## solution.w:
##  3.49331e-05 7.59311e-05 3.23388e-05 2.32942e-05 3.35483e-05 3.69255e-05 0.0002052181 4.00604e-05 2.8614e-06 3.39537e-05 0.2423115 0.0002939608 3.42245e-05 0.0005629393 5.16838e-05 4.82381e-05 2.60143e-05 5.1989e-06 1.5e-09 4.43427e-05 0.3914823 0.1001218 5.65941e-05 0.1917406 2.11699e-05 1.22483e-05 3.22666e-05 8.67791e-05 5.17961e-05 5.52526e-05 2.71134e-05 3.54593e-05 7.17821e-05 1.84354e-05 7.22458e-05 8.6192e-06 0.0003772716 3.89759e-05 2.71385e-05 2.75244e-05 1.88911e-05 0.07171855 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5342953 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1738229 0.1833219 0.06504685 0.1960577 0.1795668 0.2021838 
## 
## solution.w:
##  6.712e-07 8.055e-07 5.201e-07 9.77e-07 7.714e-07 3.6e-07 0.06518045 2.175e-06 5.515e-07 7.041e-07 0.41658 1.033e-06 4.04e-08 1.5744e-06 5.147e-07 1.2937e-06 1.5772e-06 5.323e-07 4.165e-07 1.0363e-06 5.437e-07 4.042e-07 6.585e-07 3.79e-07 0.1390058 2.02e-08 4.911e-07 6.874e-07 3.933e-07 5.083e-07 5.113e-07 5.948e-07 2.0046e-06 0.3067663 5.043e-07 5.1e-08 4.651e-07 5.632e-07 7.272e-07 1.8603e-06 0.07244018 3.194e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12153478 
## 
## solution.v:
##  0.0001316173 6.82242e-05 0.0005788508 8.33787e-05 9.9359e-06 0.000705182 0.0001395869 1.38513e-05 0.0001197986 0.0001624398 2.25141e-05 0.1660976 0.148087 0.1680793 0.1664544 0.1609516 0.1882947 
## 
## solution.w:
##  1.713e-07 4.69e-07 1.803e-07 1.907e-07 5.095e-07 7.97e-08 1.945e-07 5.6325e-06 5.548e-07 4.517e-07 4.459e-07 2.554e-07 1.069e-07 2.3709e-06 1.858e-07 0.08574447 0.4887346 1.589e-07 2.392e-07 6.553e-07 1.579e-07 0.1065645 1.83e-07 6.37e-08 9.828e-06 2.4e-09 2.045e-07 3.52e-07 7.036e-07 3.677e-07 2.578e-07 4.941e-07 1.365e-07 0.0001269867 7.856e-07 1.31e-08 1.17704e-05 0.3187898 1.0086e-06 1.799e-07 1.355e-07 1.235e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16317336 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1923201 0.180781 0.2024164 0.2005039 0.00427382 0.2197048 
## 
## solution.w:
##  1.945e-07 3.149e-07 2.145e-07 1.357e-07 2.218e-07 0.1539601 4.741e-07 9.255e-07 6.434e-07 1.661e-07 3.608e-07 0.04727989 0.1866947 6.528e-07 1.587e-07 2.701e-07 1.397e-07 1.721e-07 1.793e-07 3.112e-07 0.244735 1.39e-07 2.004e-07 1.532e-07 2.144e-07 9.57e-08 1.601e-07 2.694e-07 1.413e-07 2.078e-07 3.258e-07 2.939e-07 1.308e-07 1.334e-07 3.054e-07 8.85e-08 1.629e-07 1.968e-07 3.018e-07 2.854e-07 0.3673196 1.3704e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5508569 
## 
## solution.v:
##  0.0005717399 0.0002109028 0.001344967 0.003230121 0.00117775 0.003120928 0.0003314201 3.49415e-05 0.001134595 0.0005873664 0.002304129 0.1558854 0.147614 0.1671898 0.1704956 0.160991 0.1837753 
## 
## solution.w:
##  1.447e-07 9.03e-08 3.1063e-06 2.094e-07 1.7196e-06 4.047e-07 5.43e-08 0.0001499958 6.33e-07 1.4768e-06 1.86e-08 2.149e-07 1.8417e-06 7.402e-07 6.699e-07 2.3434e-06 0.4955358 8.35e-08 4.027e-07 3.2542e-06 1.619e-07 7.89e-08 1.692e-07 7.37e-08 1.0191e-06 0.08738994 8.142e-07 4.094e-07 1.1242e-06 0.0001254843 1.519e-07 1.3e-09 0.1386817 2.225e-07 1.4937e-06 0.278081 3.395e-07 6.9546e-06 5.3518e-06 8.16e-08 2.99e-08 9.15e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 264547.5 
## 
## solution.v:
##  0.0003769254 6.38348e-05 0.0001255552 3.938e-07 4.3112e-06 8.1196e-06 0.004024056 6.2341e-06 4.1e-06 7.871e-06 2.87285e-05 0.1579869 0.1606832 0.1653614 0.1695212 0.1580565 0.1837406 
## 
## solution.w:
##  0.000160259 0.0001186154 0.0004768489 0.0001365362 0.0004677452 0.002754231 0.0001509858 0.003419519 0.3061366 0.0001858298 9.48347e-05 0.0003546392 0.0003714794 0.0004688059 0.0003102499 0.0006739598 0.000172346 0.0001037769 8.50184e-05 0.0002616076 0.03791973 0.000117005 0.0002776208 0.0002035816 4.44643e-05 3.64709e-05 0.0001824808 0.0004174626 0.3312654 0.0005201637 0.000233751 9.88598e-05 0.0005211586 0.0003102106 0.0001420491 0.001257729 0.0001544767 0.003767881 0.264517 0.0001193719 9.9758e-05 0.04088947 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 315134347 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.1540791 0.1203626 0.2045336 0.2623926 0.05132684 0.2073052 
## 
## solution.w:
##  2.297e-07 1.746e-07 9.691e-07 3.073e-07 6.389e-07 0.09391684 2.8e-09 1.173e-06 5.418e-07 6.054e-07 1.787e-07 1.657e-07 5.987e-07 3.065e-07 3.96e-07 4.513e-07 5.445e-07 2.571e-07 5.523e-07 6.911e-07 1.363e-07 1.338e-07 1.358e-07 2.38e-08 7.019e-07 0.4955777 7.428e-07 3.125e-07 6.129e-07 7.809e-07 1.661e-07 3.92e-07 5.461e-07 3.715e-07 6.083e-07 7.322e-07 2.573e-07 7.953e-07 1.5166e-06 1.797e-07 2.171e-07 0.4104873 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 836098.9 
## 
## solution.v:
##  3.79352e-05 2.4103e-06 0.0007888589 1.09596e-05 0.0001240139 1.5055e-06 7.2425e-06 5.13969e-05 0.0003289377 1.84119e-05 0.0001820575 0.1573973 0.1476993 0.1661645 0.1849395 0.1593734 0.1828722 
## 
## solution.w:
##  1.54664e-05 5.80392e-05 4.80652e-05 1.19992e-05 2.30407e-05 3.13111e-05 5.99187e-05 2.77269e-05 0.01930286 4.92654e-05 0.0007445036 1.6483e-05 1.67412e-05 0.1373405 2.85522e-05 2.79805e-05 2.66143e-05 1.80667e-05 3.23374e-05 6.79519e-05 1.06866e-05 0.689488 1.38478e-05 5.68969e-05 1.23631e-05 0.1175715 7.15916e-05 3.25976e-05 0.0001560567 0.01403265 2.94654e-05 1.57998e-05 9.45742e-05 1.3908e-05 2.2466e-05 0.0001626205 7.9796e-06 3.43326e-05 3.00839e-05 1.07074e-05 8.7202e-06 0.02017574 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6398311 
## 
## solution.v:
##  9.614e-07 1.853e-07 1.33073e-05 4.215e-06 0.002777771 7.6535e-06 1.97e-06 3.123e-07 5.856e-07 1.7541e-06 8.39e-08 0.1583382 0.1483412 0.1657824 0.1691498 0.1725231 0.1830565 
## 
## solution.w:
##  2.2835e-06 1.3376e-06 1.28834e-05 2.0353e-06 6.765e-07 0.1578057 1.2283e-06 0.00161988 2.7258e-06 4.0919e-06 9.946e-07 2.6924e-06 0.1206477 2.2186e-06 4.3631e-06 0.01746458 3.5471e-06 1.4777e-06 2.2988e-06 3.4771e-06 2.4122e-06 1.3502e-06 3.0203e-06 1.4225e-06 1.475e-06 3.749e-07 3.8491e-06 5.0353e-06 1.254e-07 0.004423901 2.1623e-06 1.3736e-06 0.5108341 2.5528e-06 3.5636e-06 3.8275e-06 7.40341e-05 1.6667e-06 0.1870422 1.6982e-06 1.4983e-06 2.1323e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11589108 
## 
## solution.v:
##  2.5276e-06 6.55337e-05 2.00936e-05 3.0439e-05 0.0006376684 3.6127e-06 2.32592e-05 0.0001034904 6.26261e-05 0.0004109549 5.8994e-06 0.1583099 0.1477364 0.1659722 0.1853074 0.1569696 0.1843384 
## 
## solution.w:
##  5.193e-07 3.801e-07 3.4891e-06 1.0447e-06 2.7628e-06 1.8947e-06 2.71e-07 0.4574444 1.0001e-06 1.1308e-06 2.937e-07 4.38e-07 8.583e-07 5.08e-07 1.0007e-06 1.2192e-06 1.364e-06 4.401e-07 9.525e-07 1.0757e-06 6.058e-07 4.448e-07 5.414e-07 3.032e-07 0.06314258 0.02482731 1.4912e-06 7.023e-07 1.3159e-06 9.593e-07 4.337e-07 6.574e-07 1.3256e-06 5.366e-07 3.2993e-06 5.094e-07 0.1249951 5.455e-07 0.1313477 4.702e-07 4.403e-07 0.1982077 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 279622.1 
## 
## solution.v:
##  0.02459657 0.1597971 0.0009991819 2.7852e-06 0.02513281 0.03134655 0.02667548 0.01599535 0.07361434 0.003478059 0.003919701 0.08474995 0.1184908 0.1864333 0.03839598 0.05999474 0.1463773 
## 
## solution.w:
##  3.91797e-05 3.8118e-05 1.46895e-05 7.40695e-05 2.5669e-05 1.56478e-05 0.2162451 4.6239e-06 3.74009e-05 0.0007171145 1.323e-07 3.13692e-05 7.82747e-05 3.108e-07 1.19573e-05 0.0003006158 8.7381e-05 1.37053e-05 2.54785e-05 1.97423e-05 0.0001307493 0.07393053 0.0796315 2.6264e-06 3.82378e-05 1.77518e-05 0.09083271 0.001578259 4.92035e-05 2.19647e-05 0.07924735 0.001195474 1.30279e-05 0.0001476956 2.15171e-05 2.10555e-05 4.1385e-06 1.53273e-05 1.50255e-05 3.61779e-05 0.4552497 1.94071e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13436940 
## 
## solution.v:
##  0.0002116472 3.10231e-05 0.005925661 0.0002210626 8.23675e-05 0.00744011 5.1256e-06 0.0002494177 1.59212e-05 0.00114092 0.0008029648 0.1583964 0.1454516 0.162242 0.1674916 0.1631456 0.1871465 
## 
## solution.w:
##  3.1106e-06 8.961e-07 4.543e-07 9.496e-07 6.872e-07 1.735e-07 0.1438149 7.172e-07 3.843e-07 9.642e-07 1.96e-08 1.4329e-06 5.9245e-06 6.38e-07 5.74e-07 1.0624e-06 1.7032e-06 0.3360889 1.15e-07 9.127e-07 7e-10 8.725e-07 6.059e-07 6e-10 2.1413e-06 1.428e-06 3.988e-07 1.0756e-06 4.808e-07 5.628e-07 4.164e-07 3.05485e-05 1.004e-06 0.2288856 1.5134e-06 4.294e-07 1.0397e-06 4.649e-07 5.994e-07 4.759e-07 0.2911458 1.206e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 52710964 
## 
## solution.v:
##  0 0 0 0 0 0 0 0 0 0 0 0.2271691 0.1494385 0.1911728 0.195763 0.1230071 0.1134495 
## 
## solution.w:
##  2.3e-09 9e-10 1.86e-08 2.9e-09 8e-09 0.8272589 4e-10 2.38e-08 5e-10 8e-09 9e-10 1.4e-09 1.05e-08 2.2e-09 3.9e-09 5.6e-09 8.4e-09 1.6e-09 2e-10 8.2e-09 9e-10 1e-09 1.3e-09 5e-10 4.8e-09 0.1047577 8.5e-09 3e-09 5.2e-09 1.46e-08 1e-09 4e-09 7.5e-09 3.1e-09 2.24e-08 4.6e-09 0.06798323 1.6e-09 1.27e-08 3.72e-08 1.6e-09 2e-09
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
## • `w.weight` -> `w.weight...43`
mspe_test_all_lags <- mspe.test(placebos_all_lags, discard.extreme = FALSE)

mspe_test_all_lags$p.val
## [1] 0.2954545
Placebo Gaps, MSPE Plot, & P-Value with All Control States
df_synthAZ_plot_all_lags <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions_all_lags, synth_AZ_median_contributions_all_lags),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol_all_lags <- mspe.test(placebos_all_lags, discard.extreme = FALSE)

ratio_allcontrol_all_lags$p.val
## [1] 0.2954545
pre_mspe_controlstates_all_lags <- placebos_all_lags$mspe.placs

pre_mspe_controlstates_all_lags$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27","28","29","30",
                                 "31","32","33","34","35","36","37","38","39","40",
                                 "41","42","43","44")

pre_mspe_controlstates_all_lags <- pre_mspe_controlstates_all_lags %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe_all_lags <- data.frame(pre_mspe = as.numeric(placebos_all_lags$loss.v), unit = "Y1")

pre_mspe_data_all_lags <- bind_rows(pre_mspe_controlstates_all_lags, AZ_pre_mspe_all_lags)

mspe_allcontrol_data_all_lags <- ratio_allcontrol_all_lags$test

mspe_allcontrol_data_all_lags <- mspe_allcontrol_data_all_lags %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

mspe_plot_all_lags <- ggplot(mspe_allcontrol_data_all_lags, aes(x = MSPE.ratios, fill = type))  +
  geom_histogram(binwidth = 625000, color = "black", position = "stack") +
  scale_fill_manual(values = c("AZ" = "black", "control units" = "white")) +
  scale_x_continuous(labels = label_number()) +  # <- disables scientific notation
  labs(
    x = "\nPost/Pre-Treatment MSPE\n",
    y = "\nFrequency\n") +
  annotate("text", x = 5000500, y = 40.6, label = "Arizona", hjust = 0, size = 3, family = "Times New Roman") +
  annotate("segment",
           x = 5000000, xend = 500000,
           y = 40.5, yend = 40.5,
           arrow = arrow(length = unit(0.25, "cm")),
           linewidth = 0.25,
           color = "black") + 
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = -0.5),
        plot.margin = unit(c(1, 3, 0, 0), "lines"))

mspe.plot(placebos_all_lags, discard.extreme = FALSE, plot.hist = TRUE)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

mspe_plot_all_lags

ggsave(
  filename = "AllLags_MSPEPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = mspe_plot_all_lags,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

placebo_gaps_data_all_lags <- placebos_all_lags$df

## 1. synthetic values in long form
synthetic_long_all_lags <- placebo_gaps_data_all_lags %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

## 2. actual (observed) values in long form
actual_long_all_lags <- placebo_gaps_data_all_lags %>% 
  select(year, all_of(unique(synthetic_long_all_lags$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

## join & compute gap (synthetic – actual)
placebo_gaps_data_long_all_lags <- left_join(actual_long_all_lags, synthetic_long_all_lags,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       # ← sign fixed here
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long_all_lags <- inner_join(placebo_gaps_data_long_all_lags, pre_mspe_data_all_lags, by = "unit")

placebo_plot_allcontrol_all_lags <- ggplot(placebo_gaps_data_long_all_lags,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.295.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = -0.25),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol_all_lags

ggsave(
  filename = "AllLags_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol_all_lags,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 10 times AZ in Pre-Treatment Period
ratio_10mspecontrol_all_lags <- mspe.test(placebos_all_lags, discard.extreme = TRUE, mspe.limit = 10)
ratio_10mspecontrol_all_lags$p.val
## [1] 0.3095238
placebo_gaps_data_long_all_lags %>%
  summarize(n_mspe10_all_lags = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10_all_lags
##               <dbl>
## 1                41
placebo_plot_mspe10_all_lags <- ggplot(data = filter(placebo_gaps_data_long_all_lags, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than Arizona's. Associated\np-value is approximately 0.310\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10_all_lags

ggsave(
  filename = "AllLags_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10_all_lags,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps, MSPE Plot, & P-Value with Control States with MSPE < 5 times AZ in Pre-Treatment Period
ratio_5mspecontrol_all_lags <- mspe.test(placebos_all_lags, discard.extreme = TRUE, mspe.limit = 5)
ratio_5mspecontrol_all_lags$p.val
## [1] 0.3095238
placebo_gaps_data_long_all_lags %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      41
placebo_plot_mspe5_all_lags <- ggplot(data = filter(placebo_gaps_data_long_all_lags, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than Arizona's. Associated\np-value is approximately 0.310\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5_all_lags

ggsave(
  filename = "AllLags_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5_all_lags,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 2 times AZ in Pre-Treatment Period
ratio_2mspecontrol_all_lags <- mspe.test(placebos_all_lags, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol_all_lags$p.val
## [1] 0.3611111
placebo_gaps_data_long_all_lags %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      35
placebo_plot_mspe2_all_lags <- ggplot(data = filter(placebo_gaps_data_long_all_lags, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps$year), max(df_synthAZ_gaps$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than Arizona's. Associated\np-value is approximately 0.361.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2_all_lags

ggsave(
  filename = "AllLags_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2_all_lags,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Average of Pre-Treatment Outcomes Lag

Prepare Data (Averaged Lag)

data_prep_out_averagelag <- dataprep(
  foo = ds_state_slim,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit",
                 "prop_religion",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013:2018, c("mean"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (Averaged Lag)

synth_out_averagelag <- synth(
  data.prep.obj = data_prep_out_averagelag
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22207331 
## 
## solution.v:
##  0.007594602 0.002579876 0.0001229835 0.1212307 0.2164203 0.008030797 0.1794959 9.92193e-05 0.03043855 0.02740759 0.4065794 
## 
## solution.w:
##  2.54743e-05 1.67432e-05 0.02624358 5.22157e-05 0.0001146925 0.4895983 2.44151e-05 0.05646376 0.0001377152 4.80853e-05 7.10922e-05 2.28874e-05 6.53661e-05 6.01327e-05 0.0001523639 2.89817e-05 5.34819e-05 0.0001417339 6.69385e-05 9.42368e-05 1.17468e-05 4.23015e-05 1.94864e-05 4.00765e-05 5.22362e-05 2.97981e-05 0.0001175388 3.7673e-05 7.55014e-05 6.07212e-05 4.00315e-05 7.2276e-05 0.1087233 4.33884e-05 0.0002101544 6.3637e-06 0.3167008 0.0001104364 3.54093e-05 5.2617e-05 2.17367e-05 1.8457e-06 1.23301e-05
data_prep_out_averagelag$Y0 %*% synth_out_averagelag$solution.w
##      w.weight
## 2013 221263.0
## 2014 223545.1
## 2015 230979.9
## 2016 235652.7
## 2017 233346.9
## 2018 230142.9
## 2019 200845.0
## 2020 251162.1
## 2021 290737.9
## 2022 339645.5
## 2023 348820.7

Generate Tables for Arizona v. Synthetic Control v. All Other States (Averaged Lag)

real_AZ_predictors_averagelag <- data_prep_out_averagelag$X1
synth_AZ_predictors_averagelag <- data_prep_out_averagelag$X0 %*% synth_out_averagelag$solution.w

real_AZ_predictors_ds_averagelag <- as.data.frame(real_AZ_predictors_averagelag)
synth_AZ_predictors_ds_averagelag <- as.data.frame(synth_AZ_predictors_averagelag)

predictors_comparison_averagelag <- cbind(real_AZ_predictors_ds_averagelag, synth_AZ_predictors_ds_averagelag)

colnames(real_AZ_predictors_ds_averagelag) <- "Arizona"
colnames(synth_AZ_predictors_ds_averagelag) <- "Synthetic Arizona"

avg_controls_averagelag <- as.data.frame(rowMeans(data_prep_out_averagelag$X0))
colnames(avg_controls_averagelag) <- "Average of All Other States"

predictor_table_averagelag <- cbind(real_AZ_predictors_ds_averagelag, synth_AZ_predictors_ds_averagelag, avg_controls_averagelag)
rownames(predictor_table_averagelag) <- rownames(data_prep_out_averagelag$X1)
predictor_table_averagelag <- as.data.frame(predictor_table_averagelag)

predictor_table_averagelag[] <- lapply(predictor_table_averagelag, function(x) round(as.numeric(x), 2))
predictor_table_fmt_averagelag <- predictor_table_averagelag

proportion_rows_averagelag <- grep("^prop_", rownames(predictor_table_fmt_averagelag))

dollar_rows_averagelag <- setdiff(rownames(predictor_table_fmt_averagelag), c(rownames(predictor_table_fmt_averagelag)[proportion_rows_averagelag]))

predictor_table_fmt_averagelag[proportion_rows_averagelag, ] <- round(predictor_table_fmt_averagelag[proportion_rows_averagelag, ], 3)
predictor_table_fmt_averagelag[dollar_rows_averagelag, ] <- lapply(predictor_table_fmt_averagelag[dollar_rows_averagelag, ], function(x) format(x, big.mark = ",", scientific = FALSE))

predictor_table_fmt_averagelag <- predictor_table_fmt_averagelag %>%
  tibble::rownames_to_column(var = "Predictor") %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",
    "special.median_contributions.2013.2018" = "Median Contributions ($)"))

datasummary_df(
  predictor_table_fmt_averagelag,
  title = "Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States\nUsing Average of Pre-Treatment Outcomes",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AverageLag_PreTreatmentPredictorComparisons.docx"
)
## NULL

Weights of Predictor Variables in Selecting Synthetic Weights (Averaged Lag)

# Step 1: Create named table
v_weights_averagelag <- synth_out_averagelag$solution.v
predictor_names_averagelag <- rownames(data_prep_out_averagelag$X1)

v_weight_table_averagelag <- data.frame(
  Predictor = predictor_names_averagelag,
  Weight = as.numeric(v_weights_averagelag)
)

# Step 2: Format decimal places (e.g., 3 decimal places for proportions)
v_weight_table_averagelag$Weight <- round(v_weight_table_averagelag$Weight, 3)

# Step 3: Recode predictor names for presentation
v_weight_table_averagelag <- v_weight_table_averagelag %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",
    "special.median_contributions.2013.2018" = "Median Contributions ($)"
  ))

# Step 4: Export using datasummary_df
datasummary_df(
  v_weight_table_averagelag,
  title = "Predictor Variable Weights in Synthetic Control Optimization\nUsing Average of Pre-Treatment Outcomes",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AverageLag_PredictorWeights.docx"
)
## NULL
datasummary_df(
  v_weight_table_averagelag,
  title = "Predictor Variable Weights in Synthetic Control Optimization\nUsing Average of Pre-Treatment Outcomes",
  fmt = "%.3f",
  output = "markdown"
)
Predictor Variable Weights in Synthetic Control Optimization Using Average of Pre-Treatment Outcomes
Predictor Weight
Proportion: Arts Orgs 0.008
Proportion: Education Orgs 0.003
Proportion: Environmental Orgs 0.000
Proportion: Health Orgs 0.121
Proportion: Human Services Orgs 0.216
Proportion: International Orgs 0.008
Proportion: Societal Benefit Orgs 0.179
Proportion: Religious Orgs 0.000
Median Total Assets ($M) 0.030
Median Total Liabilities ($M) 0.027
Median Contributions ($) 0.407

State Weights in Synthetic Arizona (Averaged Lag)

# Vector of full state names ordered by state_id
state_fullnames <- c("Alabama", "Arkansas", 
                     "Arizona", "California", "Connecticut", 
                     "Florida", "Hawaii", "Iowa", 
                     "Idaho", "Illinois", "Indiana", "Kansas", 
                     "Kentucky", "Louisiana", "Maryland", 
                     "Maine", "Michigan", "Missouri", 
                     "Mississippi", "Montana", "North Carolina", 
                     "North Dakota", "Nebraska", "New Hampshire", 
                     "New Jersey", "New Mexico", "Nevada", 
                     "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", 
                     "Rhode Island", "South Carolina", "South Dakota", 
                     "Tennessee", "Texas", "Utah", 
                     "Virginia", "Vermont", "Washington", 
                     "Wisconsin", "West Virginia", "Wyoming")

# Apply full state names to rownames, excluding Arizona (state_id = 4)
rownames(synth_out_averagelag$solution.w) <- state_fullnames[-3]

# Create weights data frame
synth_weights_averagelag <- data.frame(
  State = rownames(synth_out_averagelag$solution.w),
  Weight = round(as.numeric(synth_out_averagelag$solution.w), 4)
)

# Sort alphabetically
synth_weights_averagelag <- synth_weights_averagelag[order(synth_weights_averagelag$State), ]

# Split into 2 columns for layout
n_averagelag <- floor(nrow(synth_weights_averagelag) / 2)

# Compute the number of rows in each column
len1_averagelag <- n_averagelag
len2_averagelag <- nrow(synth_weights_averagelag) - n_averagelag

# Fill shorter half with NAs
State_1_averagelag <- c(synth_weights_averagelag$State[1:len1_averagelag], rep(NA, len2_averagelag - len1_averagelag))
Weight_1_averagelag <- c(synth_weights_averagelag$Weight[1:len1_averagelag], rep(NA, len2_averagelag - len1_averagelag))
State_2_averagelag <- synth_weights_averagelag$State[(len1_averagelag + 1):nrow(synth_weights_averagelag)]
Weight_2_averagelag <- synth_weights_averagelag$Weight[(len1_averagelag + 1):nrow(synth_weights_averagelag)]

# Combine into data frame
weights_table_averagelag <- data.frame(
  State_1_averagelag, Weight_1_averagelag,
  State_2_averagelag, Weight_2_averagelag
)

# Display and export
library(modelsummary)

datasummary_df(
  weights_table_averagelag,
  title = "State Weights in the Synthetic Arizona\nUsing Average of Pre-Treatment Outcomes",
  fmt = "%.3f",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AverageLag_SyntheticAZWeights.docx"
)
## NULL
datasummary_df(
  weights_table_averagelag,
  title = "State Weights in the Synthetic Arizona\nUsing Average of Pre-Treatment Outcomes",
  fmt = "%.3f",
  output = "markdown"
)
State Weights in the Synthetic Arizona Using Average of Pre-Treatment Outcomes
State_1_averagelag Weight_1_averagelag State_2_averagelag Weight_2_averagelag
Alabama 0.000 New Hampshire 0.000
Arkansas 0.000 New Jersey 0.000
California 0.026 New Mexico 0.000
Connecticut 0.000 New York 0.000
Florida 0.000 North Carolina 0.000
Hawaii 0.490 North Dakota 0.000
Idaho 0.057 Ohio 0.000
Illinois 0.000 Oklahoma 0.000
Indiana 0.000 Oregon 0.000
Iowa 0.000 Pennsylvania 0.000
Kansas 0.000 Rhode Island 0.000
Kentucky 0.000 South Carolina 0.109
Louisiana 0.000 South Dakota 0.000
Maine 0.000 Tennessee 0.000
Maryland 0.000 Texas 0.000
Michigan 0.000 Utah 0.317
Mississippi 0.000 Vermont 0.000
Missouri 0.000 Virginia 0.000
Montana 0.000 Washington 0.000
Nebraska 0.000 West Virginia 0.000
Nevada 0.000 Wisconsin 0.000
NA Wyoming 0.000

Plot Actual v. Synthetic AZ Contributions Trend (Averaged Lag)

synthetic_AZ_averagelag <- data_prep_out_averagelag$Y0 %*% synth_out_averagelag$solution.w

# Create the data for real and synthetic AZ median contributions
years <- 2013:2023
real_AZ_median_contributions_averagelag <- as.numeric(data_prep_out_averagelag$Y1)
synth_AZ_median_contributions_averagelag <- as.numeric(data_prep_out_averagelag$Y0 %*% synth_out_averagelag$solution.w)

# Combine this data into a dataframe
df_synthAZ_plot_averagelag <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions_averagelag, synth_AZ_median_contributions_averagelag),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years))
)

# Plot using ggplot
synth_control_plot_AZ_averagelag <- ggplot(df_synthAZ_plot_averagelag, aes(x = year, y = value, color = group, linetype = group)) +
  geom_line(size = 1) +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = 75000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = 75000,
           yend = 75000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(0, 750000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_plot_averagelag$year), max(df_synthAZ_plot_averagelag$year), by = 1)) +
  scale_linetype_manual(values = c("Arizona" = "solid", "Synthetic Arizona" = "dashed"), name = NULL) +
  scale_color_manual(values = c("Arizona" = "black", "Synthetic Arizona" = "black"), name = NULL) +
  labs(
    x = "\nYear\n",
    y = "\nMedian Contributions to Nonprofits in Arizona\n",
    caption = "Note: Median revenues were excluded in this model due to issues of\nmulticollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.caption = element_text(hjust = 0),
    legend.position = c(0.95, 0.05),
    legend.justification = c("right", "bottom"),
    legend.background = element_rect(color = "black", fill = "white", size = 0.5),
    legend.title = element_text(size = 8),
    legend.text = element_text(size = 8),
    legend.key.width = unit(1.5, "cm"),
    plot.margin = unit(c(1,3,0,0), "lines")) 


synth_control_plot_AZ_averagelag

# Save plot
ggsave(
  filename = "AverageLag_SynthControlPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_plot_AZ_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300
)

Plot the Gaps in Arizona Contributions (Averaged Lag)

synthAZ_gaps_averagelag <- real_AZ_median_contributions_averagelag - synth_AZ_median_contributions_averagelag

df_synthAZ_gaps_averagelag <- data.frame(
  year = years,
  gap = synthAZ_gaps_averagelag
)

synth_control_gapsplot_AZ_averagelag <- ggplot(df_synthAZ_gaps_averagelag, aes(x = year, y = gap)) +
  geom_line(size = 1) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_averagelag$year), max(df_synthAZ_gaps_averagelag$year), by = 1)) +
  labs(
    x = "\nYear\n",
    y = "\nGap in Median Contributions to Arizona Nonprofits\n",
    caption = "Note: Median revenues were excluded in this model due to issues of\nmulticollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.caption = element_text(hjust = 0),
    plot.margin = unit(c(1,3,0,0), "lines"))

synth_control_gapsplot_AZ_averagelag

# Save plot
ggsave(
  filename = "AverageLag_SynthControlGapsPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_gapsplot_AZ_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300
)

Generate Arizona v. Synth. Arizona Median Contributions Comparison Table (Averaged Lag)

# Create and format table with dollar signs and commas
contributions_comparison_averagelag <- data.frame(
  Year = years,
  `Arizona (Observed)` = paste0("$", format(round(real_AZ_median_contributions_averagelag, 0), big.mark = ",")),
  `Synthetic Arizona` = paste0("$", format(round(synth_AZ_median_contributions_averagelag, 0), big.mark = ",")),
  `Difference` = paste0(
    "$",
    format(round(real_AZ_median_contributions_averagelag - synth_AZ_median_contributions_averagelag, 0),
           big.mark = ",", scientific = FALSE)
  )
)

datasummary_df(
  contributions_comparison_averagelag,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023)\nUsing Average of Pre-Treatment Outcomes",
  output = "markdown"
)
Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023) Using Average of Pre-Treatment Outcomes
Year Arizona..Observed. Synthetic.Arizona Difference
2013.00 $221,674 $221,263 $ 411
2014.00 $224,441 $223,545 $ 896
2015.00 $228,778 $230,980 $ -2,202
2016.00 $230,771 $235,653 $ -4,882
2017.00 $243,045 $233,347 $ 9,698
2018.00 $233,232 $230,143 $ 3,089
2019.00 $204,474 $200,845 $ 3,628
2020.00 $267,790 $251,162 $ 16,628
2021.00 $315,455 $290,738 $ 24,717
2022.00 $433,461 $339,646 $ 93,815
2023.00 $451,676 $348,821 $102,855
datasummary_df(
  contributions_comparison_averagelag,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023)\nUsing Average of Pre-Treatment Outcomes",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/AverageLag_ObservedVsSynthetic.docx"
)
## NULL
# View synthetic weights again if needed
rownames(synth_out_averagelag$solution.w)
##  [1] "Alabama"        "Arkansas"       "California"     "Connecticut"   
##  [5] "Florida"        "Hawaii"         "Iowa"           "Idaho"         
##  [9] "Illinois"       "Indiana"        "Kansas"         "Kentucky"      
## [13] "Louisiana"      "Maryland"       "Maine"          "Michigan"      
## [17] "Missouri"       "Mississippi"    "Montana"        "North Carolina"
## [21] "North Dakota"   "Nebraska"       "New Hampshire"  "New Jersey"    
## [25] "New Mexico"     "Nevada"         "New York"       "Ohio"          
## [29] "Oklahoma"       "Oregon"         "Pennsylvania"   "Rhode Island"  
## [33] "South Carolina" "South Dakota"   "Tennessee"      "Texas"         
## [37] "Utah"           "Virginia"       "Vermont"        "Washington"    
## [41] "Wisconsin"      "West Virginia"  "Wyoming"

Hypothesis Testing

placebos_averagelag <- generate.placebos(
  dataprep.out = data_prep_out_averagelag,
  synth.out = synth_out_averagelag,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45074635 
## 
## solution.v:
##  0.01888706 0.00224034 0.05398249 0.01736643 0.1478256 0.2613394 0.01771182 0.01096305 0.01821109 0.07910815 0.3723646 
## 
## solution.w:
##  0.6879935 2.03972e-05 1.12954e-05 2.94383e-05 7.0235e-06 0.0003197598 5.20826e-05 1.28711e-05 2.18696e-05 3.34338e-05 1.70382e-05 2.23888e-05 8.4323e-06 8.8419e-06 1.41133e-05 1.91716e-05 -1.4e-09 2.98187e-05 1.79689e-05 1.27995e-05 0.08859758 6.2911e-06 2.95088e-05 5.28709e-05 6.28463e-05 2.7737e-06 1.41625e-05 0.0335371 3.50204e-05 6.0066e-06 2.9972e-06 0.1861588 1.24203e-05 2.47153e-05 0.0001244066 8.9984e-06 2.24221e-05 7.8817e-06 1.64964e-05 1.23703e-05 1.15e-08 0.002612107 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30850302 
## 
## solution.v:
##  0.07323647 0.007807146 0.006309396 0.001857065 0.03039945 0.816376 0.001666477 1.012e-06 0.001150394 1.51576e-05 0.06118145 
## 
## solution.w:
##  0.0003119103 2.7126e-06 5.915e-07 7.371e-07 2.713e-07 2.112e-07 2.4502e-05 5.704e-07 1.20598e-05 1.43e-07 1.0734e-06 1.4788e-06 1e-10 1.662e-07 3.4041e-06 1.26574e-05 3.944e-07 2.331e-07 9.58715e-05 4.06e-08 1.265e-07 9.838e-07 0.171662 3.574e-07 8.654e-07 5.989e-07 3.9976e-06 1.4809e-06 2.3126e-06 3.0162e-06 9.204e-07 7.299e-07 2.872e-07 2.1096e-06 1.0549e-06 1.8562e-06 0.2744883 2.941e-07 4.3046e-06 9.271e-07 0.5533524 2.1099e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 841146.8 
## 
## solution.v:
##  0.4132442 0.02614739 0.009366227 0.007379621 7.40639e-05 1.587e-05 0.007378263 0.001895473 0.006187295 0.1670191 0.3612924 
## 
## solution.w:
##  3.75779e-05 0.0001947248 6.95767e-05 0.0001174866 0.3348961 1.03979e-05 0.03479843 0.0001092879 4.46332e-05 2.567e-06 4.57624e-05 0.0002645753 3.34281e-05 2.01659e-05 4.66275e-05 5.42393e-05 1.92932e-05 1.28484e-05 0.004829364 9.7041e-06 6.8887e-06 7.4266e-05 1.0264e-06 1.36288e-05 1.15e-08 0.0006325933 0.0001057456 3.73901e-05 9.45456e-05 0.0001929706 0.002638664 0.4002425 2.45532e-05 8.85775e-05 0.0820244 0.1371199 0.0001113373 6.9856e-06 0.0009097129 4.13651e-05 1.60837e-05 1.031e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5825010 
## 
## solution.v:
##  0.2491495 0.000426497 0.008511094 0.05461597 0.0002246006 0.07237463 0.05357471 0.07042963 0.001169188 0.1817782 0.3077459 
## 
## solution.w:
##  0.0003120125 0.0007310024 0.0003440882 0.0002378074 0.0003043715 0.1842873 0.0009856504 0.0004038788 0.0004374516 0.0007508484 0.0004752912 0.0004794745 0.0002659378 0.02265394 0.0003625601 0.0003975753 0.000397517 0.03609469 0.0004902595 0.02501659 0.0005714297 0.4791839 0.000951366 0.0002264492 0.000185304 0.0001282235 0.0005605769 0.0002608171 0.0004319774 0.0007114551 5.375e-07 0.0003813111 0.0003849683 0.0001514015 0.0002343033 0.1670658 0.007973004 0.06263666 0.0004303356 0.0004410071 0.0001073223 0.001553675 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5077899 
## 
## solution.v:
##  0.1473298 0.002305432 0.03672759 0.2299371 0.1270741 0.0001115564 0.03858786 0.01854013 0.0001776292 0.007306759 0.391902 
## 
## solution.w:
##  0.05301941 0.0001434003 0.0009704318 0.0001141653 5.547e-07 0.0001223439 0.04860597 5.86816e-05 4.76172e-05 3.08278e-05 7.16698e-05 5.11094e-05 0.0001239844 0.1575651 6.60316e-05 5.67663e-05 5.46632e-05 7.55794e-05 0.0001161355 1.96636e-05 6.17436e-05 0.04376047 0.02057149 7.14193e-05 8.14e-06 0.000147208 8.54533e-05 8.91005e-05 0.002917196 0.0002480403 0.0003101128 9.01995e-05 3.83238e-05 0.2294968 0.4401404 3.544e-07 0.0003718831 2.24832e-05 4.98136e-05 0.0001917522 8.0316e-06 5.4386e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 31624714 
## 
## solution.v:
##  0.001998542 0.001182461 0.02953898 0.002536284 7.628e-07 0.2590658 0.0004819958 0.1289813 0.01826398 0.00122823 0.5567216 
## 
## solution.w:
##  8.7394e-06 6.5608e-06 7.74595e-05 9.1437e-06 2.89376e-05 4.6416e-06 2.12989e-05 2.6269e-05 1.91122e-05 6.8035e-06 7.2004e-06 1.75027e-05 6.6443e-06 1.55013e-05 9.7033e-06 1.54743e-05 9.2614e-06 9.1692e-06 2.47497e-05 4.3996e-06 7.5993e-06 5.3665e-06 4.6442e-06 1.78455e-05 2.69956e-05 0.2476035 8.6586e-06 5.01452e-05 1.57228e-05 8.1119e-06 2.7519e-06 1.65118e-05 1.1127e-05 0.000799267 0.0001449489 0.1931892 7.533e-06 6.6639e-06 8.88344e-05 6.5365e-06 4.1562e-06 0.5576453 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 99908709 
## 
## solution.v:
##  0.003566581 0.001404443 0.1821733 0.05768257 0.1663149 0.007249207 5.7677e-06 0.07946263 0.0007798435 0.03864514 0.4627156 
## 
## solution.w:
##  5.105e-07 0.06260427 1.006e-07 5.648e-07 7.53e-08 3.93e-08 5.02e-08 1.182e-07 1.931e-07 1.575e-07 1.1889e-06 2.784e-07 9.08e-08 1.016e-07 1.792e-07 1.344e-07 1.63e-07 8.31e-08 1.005e-07 1.69e-08 0.002316973 0.185189 0.7498813 2.041e-07 4.8e-09 7.89e-08 9.96e-07 1.164e-07 9.41e-08 2.157e-07 1.573e-07 1.677e-07 2.216e-07 3.33e-08 9.85e-08 9.9e-09 5.916e-07 1.002e-07 6.71e-08 1.1555e-06 1.4e-09 8.8e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 39166477 
## 
## solution.v:
##  1.83274e-05 0.1120585 0.1079689 0.08259838 0.001769427 0.003541039 0.0003564654 0.002253249 0.02751733 0.4944982 0.1674201 
## 
## solution.w:
##  1.21e-07 1.085e-07 4.3e-09 1.697e-07 1.357e-07 9.88e-08 1.332e-07 9.81e-08 7.54e-08 2.184e-07 1.343e-07 9.79e-08 8.23e-08 8.691e-07 7.54e-08 8.88e-08 3.672e-07 6.94e-07 9.61e-08 1.197e-07 1.342e-07 7.38e-08 2.742e-07 1.718e-07 3e-10 2.85e-08 6.99e-08 1.094e-07 0.3394629 4.99e-08 8.9e-09 0.323774 9.14e-08 9.36e-08 1.63e-07 0.2172888 9.27e-08 3.598e-07 8.38e-08 8.29e-08 8.45e-08 0.1194685 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 49380957 
## 
## solution.v:
##  0.0346869 0.06597182 0.08962899 0.0003605877 0.08511857 0.1611726 0.1000818 0.02531509 0.1815685 0.0002103172 0.2558848 
## 
## solution.w:
##  4.251e-07 5.595e-07 2.7481e-06 7.758e-07 7.72e-07 8.4e-09 4.751e-07 7.008e-07 5.5106e-06 0.1358487 4.589e-07 0.02527901 7.754e-07 5.687e-07 4.337e-07 2.10913e-05 0.02284939 3.252e-07 4.4341e-06 6.082e-07 2.128e-07 2.763e-07 1.0389e-06 3.568e-07 4.793e-07 0.1560437 1.0888e-06 2.231e-06 3.515e-07 1.453e-06 0.08177402 3.4799e-06 0.2230775 2.2624e-06 0.2970305 0.05803998 1.5949e-06 3.579e-07 4.813e-07 3.27e-07 3.349e-07 1.527e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3405213 
## 
## solution.v:
##  0.1278078 0.01746713 5.94545e-05 0.1001879 0.06303629 0.1264269 0.003588891 0.04855565 0.1387639 0.2195867 0.1545195 
## 
## solution.w:
##  5.0456e-06 0.001650617 3.7079e-06 3.44458e-05 3.3502e-06 4.7331e-06 0.0001668015 4.172e-07 6.2206e-06 5.8946e-06 1.15322e-05 2.48867e-05 4.0111e-06 7.1938e-06 1.74443e-05 0.5637506 4.4064e-06 5.8798e-06 3.0766e-06 9.5681e-06 0.000417931 1.11187e-05 4.1998e-06 5.3394e-06 4.324e-07 4.2637e-06 0.003570559 0.06666186 1.1581e-05 1.32985e-05 1.791e-05 4.5824e-06 2.40609e-05 1.21e-08 4.7e-09 7.224e-07 0.08578287 2.8416e-06 0.171038 0.04262519 3.8599e-06 0.06407959 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 79202492 
## 
## solution.v:
##  0.000612733 0.07537693 0.0009768686 0.007216321 0.03216714 0.1908152 0.01859306 0.0031727 0.01001788 0.4605288 0.2005223 
## 
## solution.w:
##  2e-10 2.16e-08 4.064e-07 8.551e-07 6.935e-07 1.41339e-05 3.07e-08 1.111e-07 2.5525e-06 6.93e-08 9.55e-08 8.36e-08 6.882e-07 1.14973e-05 9.79e-08 1.175e-07 0.5005591 5.003e-07 1.117e-07 3.191e-07 0.3656161 1.507e-07 0.04587778 2.393e-07 1.065e-07 3.917e-07 9.5e-08 2.69e-08 1.481e-07 2e-07 4.96e-08 1.063e-07 5.223e-07 2.723e-07 8.63e-08 4.0477e-06 0.08790626 1.6143e-06 9.65e-08 1.001e-07 6.01e-08 2.87e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6090617 
## 
## solution.v:
##  0.1554074 0.009626892 0.04871122 0.1639328 0.1247085 0.08086445 0.01122882 0.07460837 2.50519e-05 0.02522538 0.3056611 
## 
## solution.w:
##  0.2853587 0.005007035 1.75549e-05 2.81401e-05 3.09229e-05 2.09455e-05 0.2765996 1.10737e-05 3.0885e-05 2.10655e-05 5.36001e-05 8.27795e-05 9.497e-06 1.6977e-05 3.48243e-05 3.38971e-05 2.976e-07 9.2014e-06 2.90504e-05 0.1460243 8.62411e-05 0.05299716 1.2e-08 5.45613e-05 1.16703e-05 9.4166e-06 3.80988e-05 0.0001234714 1.1901e-05 0.1603782 1.7648e-06 2.21559e-05 6.68711e-05 6.48294e-05 7.73837e-05 1.849e-06 1.11438e-05 2.07312e-05 1.44233e-05 2.39478e-05 0.01109673 0.06146718 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45552940 
## 
## solution.v:
##  0.1609965 0.1101798 0.003445335 0.0788292 0.1425398 0.0002727379 0.02242951 0.0003784596 0.01225162 0.0003861709 0.4682908 
## 
## solution.w:
##  2.4785e-06 1.854e-07 0.01494473 8.328e-07 1.0091e-06 6.106e-07 1.7102e-06 2.0785e-06 7.682e-07 0.03330498 6.166e-07 1.0436e-06 6.55e-07 4.734e-07 1.108e-06 1.202e-06 2.974e-07 6.314e-07 0.1619309 3.548e-07 1.3843e-06 6.606e-07 1.0465e-06 2.6187e-06 3.006e-07 6.985e-07 0.5450826 1.8594e-06 1.2536e-06 6.232e-07 4.821e-07 0.05546741 5.179e-07 8.402e-07 2.388e-06 0.1892265 2.6274e-06 3.299e-07 3.0908e-06 1.2692e-06 3.284e-07 4.5185e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22010105 
## 
## solution.v:
##  0.04590063 7.5152e-06 0.259497 0.001073935 0.007517829 0.2368947 0.3408055 0.05033084 0.003288547 0.00165026 0.05303327 
## 
## solution.w:
##  8.249e-07 2.6167e-06 8.977e-07 4.6428e-06 9.083e-07 8.219e-07 9.315e-07 0.1386959 1.6171e-06 8.101e-07 1.0415e-06 1.4183e-06 8.763e-07 2.514e-07 1.591e-06 1.369e-06 1.1382e-06 7.03e-08 2.0168e-06 0.06888071 5.35e-07 0.05272473 7.19858e-05 5.992e-07 1.0194e-06 6.1e-09 1.3816e-06 7.113e-07 3.762e-07 2.84309e-05 1.2485e-05 8.581e-07 1.3049e-06 8.611e-07 6.618e-07 1e-08 0.686507 7.8787e-06 1.0503e-06 1.4253e-06 0.05303503 1.1284e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1820761 
## 
## solution.v:
##  0.02839758 0.01687254 1.10752e-05 0.09800678 3.9769e-06 1.78073e-05 0.2265408 1.69536e-05 2.603e-06 2.17667e-05 0.6301081 
## 
## solution.w:
##  0.0001019902 0.0001290619 0.0001391993 0.0001525332 0.0001582177 0.000156848 3.558e-07 0.0001388942 0.0002778229 6.52494e-05 0.09834236 0.0001305396 0.0001228357 0.000236949 0.0001142834 0.0001369083 0.0003657193 0.0001502202 0.0001867149 0.06005208 7.8286e-06 5.43702e-05 0.2424578 0.0001055476 0.0001423448 0.0001641831 0.0001173042 0.0001216545 0.0001129855 0.0003146351 0.0003409211 0.0002007781 0.0001452056 0.0001551675 0.0001439873 0.0001342603 0.0001121666 0.5935885 0.0001013326 0.0001016856 0.0002183979 1.898e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 32564489 
## 
## solution.v:
##  0.2122737 0.002825841 0.01987883 0.00181053 0.1870822 0.02410527 0.05245394 0.3852318 0.07357611 0.006231374 0.03453032 
## 
## solution.w:
##  0.1719668 0.01094524 3.51063e-05 4.40269e-05 3.59092e-05 2.55467e-05 1.75e-08 4.14292e-05 5.69055e-05 0.3188783 7.69383e-05 6.37697e-05 0.0001334114 0.0001404104 3.25008e-05 8.95412e-05 5.9563e-05 9.4902e-05 6.0088e-05 2.57201e-05 1.68077e-05 0.1803259 7.57044e-05 0.00204156 0.0002154836 7.5599e-06 0.0004454777 1.46e-08 8.72499e-05 4.40231e-05 2.25663e-05 5.79845e-05 5.61092e-05 1.77569e-05 9.6519e-06 0.0001732648 0.0001249797 0.0002213629 0.1856896 0.001647543 0.1258482 6.51533e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18460509 
## 
## solution.v:
##  0.1087377 4.23064e-05 0.002587494 0.09654742 0.01194775 0.141467 0.139187 0.1223387 0.05400027 0.03685196 0.2862924 
## 
## solution.w:
##  0.0002211023 0.01418091 9.81896e-05 0.0001637705 0.0001496937 4.80554e-05 0.0001326571 0.01486827 0.0002212261 0.5203047 8.74748e-05 0.0001690858 0.0001515677 0.001064447 0.0001351521 0.000145376 0.002692064 0.0001262784 0.0008297719 0.08054464 6.02418e-05 0.0001396496 0.0005817078 5.83387e-05 3.213e-07 7.98311e-05 0.0005228442 9.61e-08 0.0001163073 0.0008808124 0.0002727908 0.0003454354 0.0001738698 0.2364535 6.02347e-05 5.91798e-05 0.0005053228 5.73875e-05 7.13829e-05 0.0002648264 0.1229471 1.43335e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16723264 
## 
## solution.v:
##  0.2466639 2.2158e-06 0.06449384 0.07464576 0.004616818 0.09705239 0.1568322 0.001828992 0.1122295 0.07230131 0.1693331 
## 
## solution.w:
##  0.4020139 9.55e-08 9.41e-08 3.95e-08 1.515e-07 1.63e-08 6.87e-08 8.26e-08 2.22e-07 0.0003059515 0.1618086 4.6e-08 7.447e-07 2.735e-07 3.07e-08 1.493e-07 2.33007e-05 1.983e-07 1.519e-07 1e-10 1.8454e-06 2.93e-08 1.5e-08 5.41e-08 0.06951435 2.02e-08 4.008e-07 0.02380287 7.75e-08 5.86e-08 2.83e-08 0.0004431274 4.735e-07 2.815e-07 3.436e-07 7.68e-08 7.219e-07 1.78e-08 6.07e-08 1.13e-07 0.3420809 2.82e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17034602 
## 
## solution.v:
##  0.0194528 0.334576 0.007034219 0.1711136 1.5686e-06 5.84e-08 0.0002132601 0.002541628 0.3107121 0.0007939691 0.1535608 
## 
## solution.w:
##  0.0001567117 9.03051e-05 4.94706e-05 6.29367e-05 0.0001229257 6.8391e-06 0.0001788861 6.55385e-05 4.60048e-05 3.29411e-05 7.20498e-05 0.0001427561 6.21987e-05 0.0002731648 0.0003986163 1.78496e-05 5.73049e-05 5.75437e-05 5.15998e-05 0.09475351 0.0001960558 0.0004435865 3.73335e-05 0.0004562541 0.2240972 2.52268e-05 9.24466e-05 6.40582e-05 0.0006158143 5.25269e-05 1.1832e-05 6.25613e-05 6.91317e-05 6.20308e-05 6.01241e-05 1.39854e-05 0.0001021188 0.008947966 2.61925e-05 0.2658466 0.1265652 0.2754527 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5355828 
## 
## solution.v:
##  0.01055076 0.044669 4.889e-07 0.1177883 0.03454388 0.1307564 0.1791402 0.03059772 0.1297204 0.1032455 0.2189874 
## 
## solution.w:
##  0.0001271598 0.1221115 0.1839328 0.00035529 0.000452021 0.0001535621 0.0002015027 0.2180929 0.0007915367 0.07009544 0.0002012017 0.0003558647 0.1173188 0.0007688513 0.000218242 0.0007063303 1.75935e-05 0.0006715802 0.0002616868 0.0001894627 0.0001248712 0.0004016899 0.0006852926 0.0001899718 0.0004574441 0.0007839612 0.001502996 0.0002903859 0.0003791205 0.001976907 0.0996459 0.0008323495 0.0003159904 0.1527861 0.0002065487 0.01927342 0.0007373053 0.0002248609 0.001043955 0.0002822234 0.0006707081 0.0001646535 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 78531713 
## 
## solution.v:
##  0.0001608164 0.0106763 0.0853728 8.20779e-05 0.007169043 0.01002093 0.1179148 0.4727953 0.03116801 0.06005352 0.2045864 
## 
## solution.w:
##  6.36293e-05 6.47081e-05 7.99e-06 3.90907e-05 2.07193e-05 8.7005e-06 0.2608424 1.20577e-05 1.56297e-05 3.49065e-05 5.6592e-06 0.1005183 1.09833e-05 2.11554e-05 0.001726878 4.00982e-05 3.40762e-05 1.06085e-05 1.38422e-05 1.51776e-05 0.1463386 0.1965006 1.31978e-05 7.1145e-06 9.5799e-06 1.22583e-05 1.70262e-05 5.95207e-05 1.40292e-05 0.0005496876 0.0003267233 8.2972e-06 0.1272444 3.12857e-05 1.82483e-05 4.7294e-06 1.17408e-05 1.1623e-05 1.35423e-05 0.06586914 0.0910139 0.008417988 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 38495604 
## 
## solution.v:
##  0.02007393 0.02944936 0.1519575 0.1147937 0.0767867 0.05587929 4.36379e-05 0.3649826 0.003512065 0.04757489 0.1349463 
## 
## solution.w:
##  3.7e-09 8.69e-08 4.33e-08 6.97e-08 8.35e-08 2.555e-07 0.5102312 7.1e-09 1.311e-07 1.0219e-06 0.2620841 1.866e-07 3.53e-07 6.2e-08 8.88e-08 2.809e-07 2.562e-07 1.359e-07 2.477e-07 5.4e-08 0.02811701 4.41e-08 1.07e-08 0.09448099 3.3161e-06 4.64e-08 2.054e-07 0.1050764 5.07e-08 4.21e-08 4.18e-08 7.64e-08 1.69e-06 6.75e-08 8e-10 3.32e-08 7.2e-08 1.371e-07 6.01e-08 2.42e-07 3.554e-07 3.977e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20647688 
## 
## solution.v:
##  0.111868 0.1305018 0.004437463 0.1605991 0.1166639 0.05213289 5.7958e-06 0.04921066 0.01190179 3.0948e-06 0.3626755 
## 
## solution.w:
##  5.5176e-06 1.77143e-05 3.0095e-06 0.2495756 2.5012e-06 4.1914e-06 0.4961549 1.0341e-06 2.9295e-06 4.566e-06 3.2873e-06 2.76139e-05 5.5161e-06 3.8327e-06 4.4434e-06 1.26688e-05 3.2664e-06 2.1117e-06 3.3979e-06 2.6709e-06 4.0514e-06 2.4871e-06 1.373e-06 1.17277e-05 7.508e-07 6.6851e-06 1.07711e-05 2.5017e-06 2.5013e-06 2.95363e-05 2.37e-08 2.3521e-06 5.3314e-06 8.234e-07 2.0012e-06 9.007e-07 4.0435e-06 0.06515699 4.0624e-06 0.0008806779 0.1583934 0.02963626 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 436127347 
## 
## solution.v:
##  0.06836252 0.0007327577 0.01422336 0.2017917 0.01524037 0.02188935 0.06529026 0.1085959 0.09764235 0.08799409 0.3182374 
## 
## solution.w:
##  1.2014e-06 0.1744707 9.2e-09 6.1e-09 3.98e-08 1.6e-09 3e-10 1.54e-08 1.18e-08 3.5e-09 3.535e-07 0.6685548 5.8e-09 4.85e-08 6.6e-09 1.16e-08 9.8e-09 9.98987e-05 1.06e-08 1.11e-08 0.1568725 1.03e-08 2e-10 9.9e-09 1.04e-08 6.2e-09 7.6e-09 1.46e-08 8.7e-09 5.6e-09 2.9e-09 2.96e-08 6.5e-09 2.22e-08 2.02e-08 6e-10 3.08e-08 1.03e-08 3.7e-09 7.5e-09 9.43e-08 2.8e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 59067294 
## 
## solution.v:
##  0.02696044 0.04601024 0.0008388451 8.94037e-05 0.09384006 0.04983037 0.1457056 0.326808 0.1034398 0.03327151 0.1732057 
## 
## solution.w:
##  5.253e-07 2.018e-07 1.2046e-06 4.025e-07 4.894e-07 0.0009805289 1.393e-06 2.67e-07 5.741e-07 3.772e-07 0.174534 5.245e-07 1.34345e-05 2.924e-07 4.856e-07 6.332e-07 3.235e-07 8.92e-07 6.614e-07 3.59e-07 1.687e-07 6.10078e-05 4.782e-07 2.62e-07 0.3070923 4.301e-07 8.431e-07 3.936e-07 5.678e-07 1.388e-07 1.139e-07 0.2451205 5.142e-07 2.385e-07 5.431e-07 1.772e-07 3.992e-07 0.2721814 7.321e-07 6.2e-07 1.14e-07 4.517e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 167879239 
## 
## solution.v:
##  0.0007356498 0.001862144 0.3403217 0.01220231 0.003785154 0.008184414 0.1486712 0.001360087 0.03980289 0.03278597 0.4102884 
## 
## solution.w:
##  5.737e-07 1.607e-07 1.192e-07 6.13e-08 2.484e-07 7.26e-08 7.82e-08 2e-10 1.3e-07 1.31e-07 1.938e-07 1.483e-07 2.261e-07 8.05e-08 5.19e-08 1.631e-07 2.241e-07 3.739e-07 1.48e-08 1.774e-07 1.606e-07 1.174e-07 5.81e-08 1.014e-07 0.3112544 4.95e-08 1.014e-07 4.556e-07 9.36e-08 5.63e-08 3.97e-08 2.469e-07 1.167e-07 8.41e-07 4.993e-07 0.6685784 6.69e-08 1.138e-07 1.52e-07 7.77e-08 3.997e-07 0.0201602 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2738766 
## 
## solution.v:
##  0.09914968 0.07701756 0.02007551 0.07195013 0.2066031 0.1297248 0.01640709 0.06112233 0.02668875 0.001728013 0.2895331 
## 
## solution.w:
##  7.7e-09 6.8e-09 1.31e-08 2.36e-08 3.88e-08 0.221452 1.21e-08 4.7e-09 5.86e-08 2.1e-08 3.94e-08 9.7e-09 5.7e-09 1.7933e-06 1.72e-08 2.62e-08 1.83e-08 7.6e-09 1.62e-08 1.15e-08 2.5e-08 1.81e-08 1.88e-08 1.37e-08 9e-09 1.31e-08 9.5e-09 1.75e-08 1.32e-08 1.61e-08 2.09e-08 4.7e-09 2.75e-08 3.37e-08 1.65e-08 0.2721095 0.4701473 0.03628882 2.99e-08 1e-08 2.4e-09 5e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6599321 
## 
## solution.v:
##  0.02084523 0.1422626 0.2425517 0.03912215 0.01967484 0.0006237735 0.06975515 0.1077948 0.001996214 0.05311596 0.3022576 
## 
## solution.w:
##  1.436e-07 1e-09 3.713e-07 1.2415e-06 2.71e-07 5.33e-07 0.1922327 1.685e-07 7.389e-07 0.3626572 7.939e-07 3.708e-07 0.1556462 2.2187e-06 4.725e-07 1.2767e-06 2.557e-07 3.041e-07 4.367e-07 3.842e-07 6.161e-07 1.60632e-05 1.1079e-06 1.69e-07 6.667e-07 4.119e-07 2.0891e-06 1.715e-07 3.203e-07 0.2517422 0.0004277266 3.063e-07 0.0003894033 1.787e-07 1.735e-07 7.78e-07 7.9e-09 8.151e-07 5.143e-07 0.0363775 0.0004923142 3.161e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10179804 
## 
## solution.v:
##  0.02198718 0.001484465 0.08045985 0.1455065 0.0003082061 0.01121661 0.01967596 0.05668956 0.2666553 0.05448427 0.341532 
## 
## solution.w:
##  0.0002681335 2.03503e-05 1.956e-07 5.589e-07 6.255e-07 2.04e-07 2.9554e-06 3.418e-07 7.328e-07 0.05280366 9.9e-09 1.7923e-06 1.1478e-06 6.531e-07 2.306e-07 8.678e-07 0.1323641 1.46951e-05 3.84e-07 7.941e-07 0.03606359 0.0488794 4.861e-07 2.1706e-06 2.609e-07 1.679e-07 2.889e-07 1.5252e-06 3.415e-07 8.321e-07 3.648e-07 8.5e-07 7.604e-07 0 0.7295618 1.473e-07 1.2179e-06 2.117e-07 2.777e-07 9.598e-07 1.6405e-06 2.865e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 38706069 
## 
## solution.v:
##  2.56191e-05 1.31263e-05 0.1471622 0.04874646 7.31937e-05 0.2295186 0.1431446 0.0002835623 0.03281566 0.05634808 0.3418689 
## 
## solution.w:
##  0.0001515372 8.08957e-05 0.001548271 6.43634e-05 7.14647e-05 6.98217e-05 7.74295e-05 0.5784807 3.59955e-05 0.0001728698 1.82494e-05 5.10961e-05 0.0001043262 1.9771e-05 2.62953e-05 9.06983e-05 5.77962e-05 3.90652e-05 0.1429511 0.0001048558 1.23164e-05 5.71186e-05 6.46535e-05 2.09849e-05 0.0004677149 3.21874e-05 3.11983e-05 0.0001245289 7.18874e-05 4.58254e-05 6.21503e-05 0.0001622686 2.7601e-05 5.04765e-05 9.44851e-05 0.1040492 0.1645344 1.57967e-05 0.00557276 0.0002609415 2.4849e-05 3.89e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13096851 
## 
## solution.v:
##  0.09702163 0.0008562551 0.002796708 0.1434896 0.2060259 0.008538492 0.1060219 0.07442081 0.004306675 0.0006347673 0.3558873 
## 
## solution.w:
##  0.0004510863 0.1862975 0.0002023398 0.001906925 0.0002610636 9.8073e-05 0.02089333 1.7877e-06 0.0003112789 0.0001900075 0.0004196986 0.0005469313 0.0003172433 0.0007641569 0.0008635679 0.0003233725 0.0003186442 0.0006564593 0.0003761535 0.0003498722 0.1984051 0.0006320214 0.08583791 0.2036874 0.0001688994 4.52235e-05 0.000183553 0.00170297 0.0002025201 0.000341003 0.2697836 0.0004553289 0.0005025821 0.0001470983 0.0002006951 2.09678e-05 0.001118263 0.000238133 0.0001330855 0.02055464 1.53861e-05 7.41686e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 87685665 
## 
## solution.v:
##  0.0068412 0.04603312 0.06694711 0.01280507 0.04356172 0.003988361 0.02051179 0.004433182 0.003990128 0.7553586 0.03552973 
## 
## solution.w:
##  2.86e-08 4.39e-08 8.19e-08 2.035e-07 8.02e-08 2.31e-07 5.99e-08 6.42e-08 1.18e-07 5.02e-08 5.04e-08 7.05e-08 7.05e-08 2.704e-07 1.66448e-05 9.93e-08 6.06e-08 5.17e-08 1.163e-07 8.47e-08 7.39e-08 4.45e-08 1.7872e-06 6.93e-08 8.53e-08 3.77e-08 0.4789125 1.064e-07 3.25e-08 7.8e-08 0.5210657 5.47e-08 1.077e-07 6.5e-08 3.76e-08 7.06e-08 7.43e-08 2.835e-07 7.32e-08 1.673e-07 9.13e-08 2.86e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 37766489 
## 
## solution.v:
##  0.02105642 0.003099074 0.1285166 0.1172908 0.01144809 0.1306387 0.1971606 0.04537457 4.86504e-05 0.2820317 0.06333476 
## 
## solution.w:
##  0.0003916552 8.241e-07 1.3635e-06 9.454e-07 1.7353e-06 1.2168e-06 9.833e-07 0.2793399 9.798e-07 1.8603e-06 5.327e-07 1.0769e-06 0.1798278 5.687e-07 1.613e-06 9.95e-07 1.222e-06 0.001919569 5.663e-07 1.5009e-06 6.233e-07 0.2538755 7.985e-07 7.81e-07 0.0466703 5.939e-07 3.015e-07 1.8373e-06 0.2378753 2.2303e-06 8.824e-07 8.088e-07 1.0903e-06 2.5737e-06 6.3579e-05 6.529e-07 8.642e-07 5.888e-07 1.0572e-06 1.9653e-06 7.945e-07 5.1e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 33365754 
## 
## solution.v:
##  0.09726962 0.001512518 0.01740735 0.1005257 0.1670884 0.07293247 0.001956467 0.05054372 0.00217363 0.0004429251 0.4881472 
## 
## solution.w:
##  2.83995e-05 2.3566e-05 2.9357e-05 3.43267e-05 3.4719e-05 0.05183807 3.9104e-05 1.5326e-05 5.7615e-06 5.48913e-05 0.1436216 4.37775e-05 0.3491948 2.65699e-05 2.80399e-05 6.49207e-05 3.67037e-05 3.14951e-05 2.00138e-05 3.35445e-05 0.3555446 0.03120186 2.34535e-05 1.67316e-05 2.53807e-05 4.11551e-05 0.06259421 5.50209e-05 1.1485e-06 1.69557e-05 4.14663e-05 1.122e-06 2.59221e-05 3.31107e-05 4.36107e-05 2.32301e-05 2.25929e-05 2.20556e-05 2.7224e-05 2.71442e-05 0.004995013 1.19434e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6174321 
## 
## solution.v:
##  0.02228094 0.009484253 0.06386265 0.0001343971 0.004285148 0.07618094 4.51989e-05 2.4553e-06 0.001480614 3.93206e-05 0.8222041 
## 
## solution.w:
##  5.86142e-05 6.02863e-05 0.0002000234 2.56924e-05 0.0003382477 8.9995e-06 1.39031e-05 0.0001619462 8.43161e-05 1.538e-07 2.37105e-05 1.8976e-05 9.482e-07 0.0004127591 2.18109e-05 5.2646e-05 0.6432867 5.9099e-05 5.38767e-05 0.0002738005 2.2159e-05 1.31163e-05 1.73685e-05 7.90142e-05 1.60764e-05 0.08234959 0.0001701116 2.05519e-05 3.164e-07 8.06663e-05 2.77373e-05 1.67774e-05 6.42213e-05 1.20909e-05 0.0004717395 0.2708999 0.0004443573 2.16686e-05 9.17557e-05 2.41551e-05 5.8e-09 1.128e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12639259 
## 
## solution.v:
##  0.00820897 0.08015497 0.01621139 0.1721702 0.0008184606 0.04493301 0.1928236 0.03883004 0.05863528 0.2748135 0.1124006 
## 
## solution.w:
##  6.0545e-06 2.58789e-05 0.2103969 3.1414e-06 1.27928e-05 2.2509e-06 5.2547e-06 0.105263 3.8776e-06 9.683e-07 5.7765e-06 8.0077e-06 2.96e-06 2.0116e-06 1.2433e-06 2.58e-06 3.0511e-06 3.17952e-05 1.5637e-06 7.8915e-06 1.7941e-06 2.4438e-06 2.8166e-06 0.0001444545 3.0729e-06 8.89e-07 2.0095e-06 2.7134e-06 0.6835653 1.6542e-06 2.592e-06 1.1143e-06 0.0004544695 1.7058e-06 1.29997e-05 1.848e-07 5.9628e-06 2.1883e-06 5.114e-07 2.2888e-06 1.8794e-06 1.9e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 323767286 
## 
## solution.v:
##  0.02047781 0.00165786 0.1713316 0.02213471 0.06298972 0.01341255 0.01315359 0.000617491 0.02916994 0.2009014 0.4641533 
## 
## solution.w:
##  1.8889e-06 1.4517e-06 1.1673e-06 2.0603e-06 2.7763e-06 0.4466242 1.1098e-06 8.533e-06 1.5715e-06 3.3062e-06 1.1946e-06 1.2736e-06 2.2889e-06 1.3883e-06 1.8939e-06 1.8384e-06 2.0845e-06 1.3307e-06 2.7042e-06 3.5373e-06 7.978e-07 1.4773e-06 9.946e-07 1.1166e-06 3.5351e-06 0.5421947 2.911e-07 1.5035e-06 2.7893e-06 9.0084e-06 9.536e-07 1.3948e-06 2.5074e-06 1.3433e-06 5.037e-07 1.2375e-06 2.5e-06 2.97e-06 0.000104605 1.1749e-06 6.173e-07 0.01099643 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9479520 
## 
## solution.v:
##  0.182348 0.002562509 0.07063633 0.000122669 0.08684553 0.0004865281 0.1812695 0.1092789 0.0114661 0.1246082 0.2303757 
## 
## solution.w:
##  0.0005429308 0.0006937125 0.004938881 0.003438937 0.0008421098 0.0003917962 0.0003771589 9.6623e-06 0.001407459 0.003929072 0.05413623 0.0004842625 0.0006856098 0.2529239 6.64595e-05 0.0003898091 0.001094481 0.1305999 0.007221934 0.001199524 0.0002711582 0.2904523 0.0003425567 0.0345425 0.0003223531 0.000198581 0.0006365185 0.0009880862 0.001272285 0.0001777179 0.0007139577 0.0005043189 0.196616 0.0008398515 0.0004541428 0.001858209 0.003006839 0.0002919438 0.0005419725 0.0004453364 0.0001228986 2.65332e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 36021487 
## 
## solution.v:
##  0.0006825433 0.001398645 0.001072961 0.0106006 0.7181589 0.01875303 0.02367643 0.04865226 0.05413661 3.84571e-05 0.1228295 
## 
## solution.w:
##  3.57e-08 2.28e-08 2.649e-07 4.06e-08 2.514e-07 7.79e-08 1.496e-07 5.5672e-06 1.544e-07 2.37e-08 5.973e-07 3.555e-07 1.443e-07 1.094e-07 0.4080931 1.031e-07 5.68e-08 5.188e-07 1.15541e-05 1.638e-07 1.449e-07 1.159e-07 0.167117 3.8981e-06 2.3602e-05 3.4802e-06 1.2e-09 7e-08 6.92e-08 8.514e-07 1.101e-07 2.59e-08 5.822e-07 7.84e-08 9.41e-08 1.289e-07 0.3286984 5.36e-08 1.706e-07 9.08e-08 3.159e-07 0.09603738 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28159209 
## 
## solution.v:
##  0.5456338 0.002932434 0.09971629 0.04158845 0.008141128 0.01629136 0.1759053 0.07294307 4.609e-07 1.61164e-05 0.03683162 
## 
## solution.w:
##  6.52941e-05 3.75655e-05 0.5897875 2.22856e-05 1.37429e-05 0.0003319419 3.26469e-05 1.17e-08 1.05966e-05 6.92285e-05 6.222e-06 2.3926e-05 1.147e-07 1.28212e-05 4.4498e-06 0.0001376268 1.95331e-05 4.7019e-06 1.0891e-05 1.19714e-05 6.3132e-06 9.6202e-06 6.42277e-05 6.4965e-06 0.09292674 1.11619e-05 0.0001702782 2.59684e-05 2.08238e-05 0.02510089 1.21404e-05 1.44422e-05 4.1209e-06 1.10858e-05 7.3428e-06 1.22921e-05 0.1573144 6.2867e-05 2.47e-08 6.405e-05 1.10409e-05 0.1335405 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 673057 
## 
## solution.v:
##  0.01415166 0.09017253 9.3845e-06 1.7248e-06 0.1212986 0.0015968 0.004890085 0.001362981 0.4248141 0.007886818 0.3338154 
## 
## solution.w:
##  0.0001806822 3.88971e-05 9.25493e-05 0.0002464853 0.0001913353 0.0001070011 0.1137809 6.04099e-05 0.0002159972 0.007050449 0.000281658 0.0002933192 0.0001241597 0.0006853288 0.0001755521 0.001942325 0.0002885334 0.0001699328 0.0002783589 0.0001306564 0.03365751 0.09583236 0.1984733 0.0001071162 0.000175657 0.0001373975 0.0009863078 3.3e-09 0.0002052618 0.0001473471 0.0002693701 0.09450269 0.0001172223 0.02081315 0.0001721735 0.0001397006 5.02927e-05 0.000360805 0.0002272957 0.0001557144 0.4270668 6.80678e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20844665 
## 
## solution.v:
##  0.005174794 0.05723285 0.01260871 0.003012713 0.1198507 0.05501936 0.1375531 0.0753003 0.1761668 0.1941495 0.1639313 
## 
## solution.w:
##  0.1328245 0.001230239 8.117e-07 7.953e-07 2.1767e-06 7.122e-07 9.874e-07 1.3102e-06 1.2006e-06 5.5143e-06 1.3984e-06 3.7354e-06 2.8388e-06 2.3549e-06 6.959e-07 0.001652436 4.424e-06 1.7184e-06 5.9983e-06 1.8895e-06 0.005983508 1.4679e-06 1.7e-09 1.6753e-06 3.6874e-06 0.004377482 8.965e-07 3.495e-06 2.2678e-06 2.688e-06 2.476e-07 2.653e-07 1.3714e-06 1.3661e-06 2.5968e-06 1.0783e-06 8.598e-07 1.2029e-06 2.6287e-06 2.6059e-06 0.8126862 0.04117672 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 372634031 
## 
## solution.v:
##  0.04159485 0.1441894 0.09025649 3.37219e-05 0.1012122 0.04960409 0.0002038235 0.06910269 2.09283e-05 0.2904645 0.2133173 
## 
## solution.w:
##  4.73e-08 3.876e-07 2.6e-09 4.486e-07 2.4e-09 2.33e-08 3.578e-07 0.2681962 7.7e-09 1.98e-08 2.1e-08 4.609e-07 7.45e-07 1.15e-08 1.13e-07 1.396e-07 1.95e-08 8.9e-09 1.8949e-06 2.53e-08 2.637e-07 1.074e-07 9.2207e-06 8.9e-09 4.38835e-05 0.7315918 2.7e-09 2.319e-07 7e-10 2.5345e-06 4.42e-08 5.62e-08 9e-09 7.01e-08 1e-10 6e-10 3e-10 4.9e-09 2.77768e-05 9.82e-08 1.2452e-06 0.0001217885
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
## • `w.weight` -> `w.weight...43`
mspe_test_averagelag <- mspe.test(placebos_averagelag, discard.extreme = FALSE)

mspe_test_averagelag$p.val
## [1] 0.09090909
Placebo Gaps, MSPE Plot, & P-Value with All Control States
df_synthAZ_plot_averagelag <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions_averagelag, synth_AZ_median_contributions_averagelag),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol_averagelag <- mspe.test(placebos_averagelag, discard.extreme = FALSE)

ratio_allcontrol_averagelag$p.val
## [1] 0.09090909
pre_mspe_controlstates_averagelag <- placebos_averagelag$mspe.placs

pre_mspe_controlstates_averagelag$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27","28","29","30",
                                 "31","32","33","34","35","36","37","38","39","40",
                                 "41","42","43","44")

pre_mspe_controlstates_averagelag <- pre_mspe_controlstates_averagelag %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe_averagelag <- data.frame(pre_mspe = as.numeric(placebos_averagelag$loss.v), unit = "Y1")

pre_mspe_data_averagelag <- bind_rows(pre_mspe_controlstates_averagelag, AZ_pre_mspe_averagelag)

mspe_allcontrol_data_averagelag <- ratio_allcontrol_averagelag$test

mspe_allcontrol_data_averagelag <- mspe_allcontrol_data_averagelag %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

mspe_plot_averagelag <- ggplot(mspe_allcontrol_data_averagelag, aes(x = MSPE.ratios, fill = type))  +
  geom_histogram(color = "black", position = "stack") +
  scale_fill_manual(values = c("AZ" = "black", "control units" = "white")) +
  scale_x_continuous(labels = label_number()) +  # <- disables scientific notation
  labs(
    x = "\nPost/Pre-Treatment MSPE\n",
    y = "\nFrequency\n") +
  annotate("text", x = 153, y = 9.5, label = "Arizona", hjust = 0, size = 3.5, family = "Times New Roman") +
  annotate("segment",
           x = 181, xend = 181,
           y = 9, yend = 1.2,
           arrow = arrow(length = unit(0.25, "cm")),
           linewidth = 0.25,
           color = "black") + 
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = -0.5),
        plot.margin = unit(c(1, 3, 0, 0), "lines"))


mspe.plot(placebos_averagelag, discard.extreme = FALSE, plot.hist = TRUE)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

mspe_plot_averagelag
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggsave(
  filename = "AverageLag_MSPEPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = mspe_plot_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
placebo_gaps_data_averagelag <- placebos_averagelag$df

## 1. synthetic values in long form
synthetic_long_averagelag <- placebo_gaps_data_averagelag %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

## 2. actual (observed) values in long form
actual_long_averagelag <- placebo_gaps_data_averagelag %>% 
  select(year, all_of(unique(synthetic_long_averagelag$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

## join & compute gap (synthetic – actual)
placebo_gaps_data_long_averagelag <- left_join(actual_long_averagelag, synthetic_long_averagelag,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       # ← sign fixed here
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long_averagelag <- inner_join(placebo_gaps_data_long_averagelag, pre_mspe_data_averagelag, by = "unit")

placebo_plot_allcontrol_averagelag <- ggplot(placebo_gaps_data_long_averagelag,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_averagelag$year), max(df_synthAZ_gaps_averagelag$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.091. Median revenues were\nexcluded in this model due to issues of multicollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol_averagelag

ggsave(
  filename = "AverageLag_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 10 times AZ in Pre-Treatment Period
ratio_10mspecontrol_averagelag <- mspe.test(placebos_averagelag, discard.extreme = TRUE, mspe.limit = 10)
ratio_10mspecontrol_averagelag$p.val
## [1] 0.09756098
placebo_gaps_data_long_averagelag %>%
  summarize(n_mspe10_averagelag = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10_averagelag
##                 <dbl>
## 1                  40
placebo_plot_mspe10_averagelag <- ggplot(data = filter(placebo_gaps_data_long_averagelag, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_averagelag$year), max(df_synthAZ_gaps_averagelag$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than\nArizona's. Associated p-value is approximately 0.098. Median revenues were\nexcluded in this model due to issues of multicollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10_averagelag

ggsave(
  filename = "AverageLag_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps, MSPE Plot, & P-Value with Control States with MSPE < 5 times AZ in Pre-Treatment Period
ratio_5mspecontrol_averagelag <- mspe.test(placebos_averagelag, discard.extreme = TRUE, mspe.limit = 5)
ratio_5mspecontrol_averagelag$p.val
## [1] 0.1
placebo_gaps_data_long_averagelag %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      39
placebo_plot_mspe5_averagelag <- ggplot(data = filter(placebo_gaps_data_long_averagelag, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_averagelag$year), max(df_synthAZ_gaps_averagelag$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than\nArizona's. Associated p-value is approximately 0.100. Median revenues were\nexcluded in this model due to issues of multicollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5_averagelag

ggsave(
  filename = "AverageLag_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 2 times AZ in Pre-Treatment Period
ratio_2mspecontrol_averagelag <- mspe.test(placebos_averagelag, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol_averagelag$p.val
## [1] 0.125
placebo_gaps_data_long_averagelag %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      31
placebo_plot_mspe2_averagelag <- ggplot(data = filter(placebo_gaps_data_long_averagelag, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(df_synthAZ_gaps_averagelag$year), max(df_synthAZ_gaps_averagelag$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGaps in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than\nArizona's. Associated p-value is approximately 0.125. Median revenues were\nexcluded in this model due to issues of multicollinearity in the predictors.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2_averagelag

ggsave(
  filename = "AverageLag_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2_averagelag,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Compare Results of Different Pre-Treatment Outcome Lags

Trend Plot

grid.arrange(synth_control_plot_AZ, synth_control_plot_AZ_all_lags, synth_control_plot_AZ_averagelag, ncol = 1)

Gaps Plot

grid.arrange(synth_control_gapsplot_AZ, synth_control_gapsplot_AZ_all_lags, synth_control_gapsplot_AZ_averagelag, ncol = 1)

grid.arrange(synth_control_gapsplot_AZ, synth_control_gapsplot_AZ_all_lags, ncol = 1)

grid.arrange(synth_control_gapsplot_AZ, synth_control_gapsplot_AZ_averagelag, ncol = 1)

Backdating

Prepare Data (Backdating)

data_prep_out_backdated <- dataprep(
  foo = ds_state_slim,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit",
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  time.predictors.prior = 2013:2016,
  time.optimize.ssr = 2013:2016,
  time.plot = 2013:2023,
  unit.names.variable = "state"
)

Generate Weights (Backdating)

synth_out_backdated <- synth(
  data.prep.obj = data_prep_out_backdated
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5156825 
## 
## solution.v:
##  0.0006142456 0.0002862014 0.01286902 0.02606612 0.1093187 0.1417726 0.07408822 0.003415607 0.08007409 0.099234 0.1091341 0.1094167 0.1214852 0.1122252 
## 
## solution.w:
##  2.13e-07 9.94e-08 0.1647469 6.727e-07 3.39e-08 0.6802306 2.612e-07 1.0673e-06 9.08064e-05 3.455e-07 1.2353e-06 3.314e-07 9.58e-07 6.652e-07 6.823e-07 6.276e-07 5.536e-07 1.3562e-06 5.779e-07 4.488e-07 2.676e-07 4.558e-07 3.677e-07 5.666e-07 0.001929416 0.1014263 0.05155095 4.241e-07 7.826e-07 1.5761e-06 5.107e-07 6.188e-07 1.0825e-06 4.897e-07 6.884e-07 1.6476e-06 2.4236e-06 3.243e-07 5.869e-07 1.413e-06 2.695e-07 1.643e-07 2.019e-07
data_prep_out_backdated$Y0 %*% synth_out_backdated$solution.w
##      w.weight
## 2013 222654.4
## 2014 225916.8
## 2015 228242.7
## 2016 226623.5
## 2017 228642.3
## 2018 224645.4
## 2019 201642.3
## 2020 249399.5
## 2021 277575.7
## 2022 342624.5
## 2023 345483.8

Generate Tables for Arizona vs. Synthetic Control vs. All Other States (Backdating)

# Extract real and synthetic predictor values
real_AZ_predictors_backdated <- data_prep_out_backdated$X1
synth_AZ_predictors_backdated <- data_prep_out_backdated$X0 %*% synth_out_backdated$solution.w

# Convert to data frames
real_AZ_predictors_ds_backdated <- as.data.frame(real_AZ_predictors_backdated)
synth_AZ_predictors_ds_backdated <- as.data.frame(synth_AZ_predictors_backdated)

# Combine real and synthetic
predictors_comparison_backdated <- cbind(
  real_AZ_predictors_ds_backdated,
  synth_AZ_predictors_ds_backdated
)

# Add column names
colnames(real_AZ_predictors_ds_backdated) <- "Arizona"
colnames(synth_AZ_predictors_ds_backdated) <- "Synthetic Arizona"

# Add average of all control units
avg_controls_backdated <- as.data.frame(rowMeans(data_prep_out_backdated$X0))
colnames(avg_controls_backdated) <- "Average of All Other States"

# Combine all into one table
predictor_table_backdated <- cbind(
  real_AZ_predictors_ds_backdated,
  synth_AZ_predictors_ds_backdated,
  avg_controls_backdated
)
rownames(predictor_table_backdated) <- rownames(data_prep_out_backdated$X1)

# Convert to data frame and round
predictor_table_backdated <- as.data.frame(predictor_table_backdated)
predictor_table_backdated[] <- lapply(predictor_table_backdated, function(x) round(as.numeric(x), 2))

# Copy for formatting
predictor_table_fmt_backdated <- predictor_table_backdated
# Identify proportion and employment rows
proportion_rows_backdated <- grep("^prop_", rownames(predictor_table_fmt_backdated))

# Identify dollar value rows (everything else)
dollar_rows_backdated <- setdiff(
  rownames(predictor_table_fmt_backdated),
  c(rownames(predictor_table_fmt_backdated)[proportion_rows_backdated])
)

# Format values
predictor_table_fmt_backdated[proportion_rows_backdated, ] <- round(predictor_table_fmt_backdated[proportion_rows_backdated, ], 3)
predictor_table_fmt_backdated[dollar_rows_backdated, ] <- lapply(
  predictor_table_fmt_backdated[dollar_rows_backdated, ],
  function(x) format(x, big.mark = ",", scientific = FALSE)
)

# Add rownames as a column
predictor_table_fmt_backdated <- predictor_table_fmt_backdated %>%
  tibble::rownames_to_column(var = "Predictor")
# Recode variable names for presentation
predictor_table_fmt_backdated <- predictor_table_fmt_backdated %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",

    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",

    "special.median_contributions.2013" = "Median Contributions - 2013 ($)",
    "special.median_contributions.2014" = "Median Contributions - 2014 ($)",
    "special.median_contributions.2015" = "Median Contributions - 2015 ($)"))

# Export the formatted table
datasummary_df(
  predictor_table_fmt_backdated,
  title = "Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States\nBackdating",
  output = "markdown"
)
Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States Backdating
Predictor Arizona Synthetic Arizona Average of All Other States
Proportion: Arts Orgs 0.08 0.13 0.09
Proportion: Education Orgs 0.21 0.16 0.14
Proportion: Environmental Orgs 0.05 0.06 0.05
Proportion: Health Orgs 0.13 0.14 0.15
Proportion: Human Services Orgs 0.34 0.34 0.38
Proportion: International Orgs 0.02 0.02 0.01
Proportion: Societal Benefit Orgs 0.11 0.1 0.11
Proportion: Religious Orgs 0.06 0.04 0.05
Median Total Revenue ($) 610,282.75 540,494.25 475,474.71
Median Total Assets ($M) 0.71 0.78 0.80
Median Total Liabilities ($M) 0.05 0.06 0.05
Median Contributions - 2013 ($) 221,674.00 222,654.40 175,373.26
Median Contributions - 2014 ($) 224,441.00 225,916.77 175,730.28
Median Contributions - 2015 ($) 228,778.00 228,242.71 179,445.67
datasummary_df(
  predictor_table_fmt_backdated,
  title = "Pre-Treatment Predictor Comparison: Arizona vs. Synthetic Control vs. All Other States\nBackdating",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/Backdated_PredictorComparisons.docx"
)
## NULL

Weights of Predictor Variables in Selecting Synthetic Weights (Backdating)

# Extract predictor weights
v_weights_backdated <- synth_out_backdated$solution.v
predictor_names_backdated <- rownames(data_prep_out_backdated$X1)

# Create data frame
v_weight_table_backdated <- data.frame(
  Predictor = predictor_names_backdated,
  Weight = round(as.numeric(v_weights_backdated), 3)
)

# Recode predictor names
v_weight_table_backdated <- v_weight_table_backdated %>%
  mutate(Predictor = recode(Predictor,
    "prop_arts" = "Proportion: Arts Orgs",
    "prop_edu" = "Proportion: Education Orgs",
    "prop_env" = "Proportion: Environmental Orgs",
    "prop_health" = "Proportion: Health Orgs",
    "prop_hso" = "Proportion: Human Services Orgs",
    "prop_int" = "Proportion: International Orgs",
    "prop_member" = "Proportion: Member Benefit Orgs",
    "prop_socialbenefit" = "Proportion: Societal Benefit Orgs",
    "prop_religion" = "Proportion: Religious Orgs",
    
    "median_revenues" = "Median Total Revenue ($)",
    "median_assets_mil" = "Median Total Assets ($M)",
    "median_liabilities_mil" = "Median Total Liabilities ($M)",
    
    "special.median_contributions.2013" = "Median Contributions - 2013 ($)",
    "special.median_contributions.2014" = "Median Contributions - 2014 ($)",
    "special.median_contributions.2015" = "Median Contributions - 2015 ($)"
  ))

# Display or export
datasummary_df(
  v_weight_table_backdated,
  title = "Predictor Variable Weights in Synthetic Control Optimization\nUsing Backdated (Average) Pre-Treatment Outcomes",
  fmt = "%.3f",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/Backdated_PredictorWeights.docx"
)
## NULL

State Weights in Synthetic Arizona (Backdating)

# Vector of full state names ordered by state_id
state_fullnames <- c("Alabama", "Arkansas", 
                     "Arizona", "California", "Connecticut", 
                     "Florida", "Hawaii", "Iowa", 
                     "Idaho", "Illinois", "Indiana", "Kansas", 
                     "Kentucky", "Louisiana", "Maryland", 
                     "Maine", "Michigan", "Missouri", 
                     "Mississippi", "Montana", "North Carolina", 
                     "North Dakota", "Nebraska", "New Hampshire", 
                     "New Jersey", "New Mexico", "Nevada", 
                     "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", 
                     "Rhode Island", "South Carolina", "South Dakota", 
                     "Tennessee", "Texas", "Utah", 
                     "Virginia", "Vermont", "Washington", 
                     "Wisconsin", "West Virginia", "Wyoming")

# Assign names to control units (exclude Arizona, state_id = 4)
rownames(synth_out_backdated$solution.w) <- state_fullnames[-3]

# Create data frame of state weights
synth_weights_backdated <- data.frame(
  State = rownames(synth_out_backdated$solution.w),
  Weight = round(as.numeric(synth_out_backdated$solution.w), 4)
)

# Sort alphabetically
synth_weights_backdated <- synth_weights_backdated[order(synth_weights_backdated$State), ]

# Split into two columns for display
n_backdated <- floor(nrow(synth_weights_backdated) / 2)
len1_backdated <- n_backdated
len2_backdated <- nrow(synth_weights_backdated) - n_backdated

State_1_backdated <- c(synth_weights_backdated$State[1:len1_backdated], rep(NA, len2_backdated - len1_backdated))
Weight_1_backdated <- c(synth_weights_backdated$Weight[1:len1_backdated], rep(NA, len2_backdated - len1_backdated))
State_2_backdated <- synth_weights_backdated$State[(len1_backdated + 1):nrow(synth_weights_backdated)]
Weight_2_backdated <- synth_weights_backdated$Weight[(len1_backdated + 1):nrow(synth_weights_backdated)]

# Combine into display table
weights_table_backdated <- data.frame(
  State_1_backdated, Weight_1_backdated,
  State_2_backdated, Weight_2_backdated
)

# Display or export
datasummary_df(
  weights_table_backdated,
  title = "State Weights in the Synthetic Arizona\nUsing Backdated (Average) Pre-Treatment Outcomes",
  fmt = "%.3f",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/Backdated_SyntheticAZWeights.docx"
)
## NULL

Plot Actual v. Synthetic AZ Contributions Trend (Backdating)

# Compute synthetic Arizona contributions
synthetic_AZ_backdated <- data_prep_out_backdated$Y0 %*% synth_out_backdated$solution.w

# Time series
years <- 2013:2023
real_AZ_median_contributions_backdated <- as.numeric(data_prep_out_backdated$Y1)
synth_AZ_median_contributions_backdated <- as.numeric(synthetic_AZ_backdated)

# Combine into dataframe
df_synthAZ_plot_backdated <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions_backdated, synth_AZ_median_contributions_backdated),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years))
)

# Plot using ggplot
synth_control_plot_AZ_backdated <- ggplot(df_synthAZ_plot_backdated, aes(x = year, y = value, color = group, linetype = group)) +
  geom_line(size = 1) +
  geom_vline(xintercept = 2015.5, linetype = "dotted") +
  annotate("text", x = 2014.95, y = 75000, 
           label = "Artificial Adoption of the\nUniversal Charitable Deduction", 
           hjust = 1, size = 2, family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment", x = 2015, xend = 2015.4, y = 75000, yend = 75000,
           arrow = arrow(length = unit(0.15, "inches")), color = "black") +
  scale_y_continuous(labels = scales::label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(0, 750000)) +
  scale_x_continuous(breaks = seq(min(years), max(years), by = 1)) +
  scale_linetype_manual(values = c("Arizona" = "solid", "Synthetic Arizona" = "dashed"), name = NULL) +
  scale_color_manual(values = c("Arizona" = "black", "Synthetic Arizona" = "black"), name = NULL) +
  labs(
    x = "\nYear\n",
    y = "\nMedian Contributions to Nonprofits in Arizona\n",
    caption = "Note: Associated p-values are approximately 0.250 when all control states are included in calculation,\n0.275 when control states with pre-treatment MSPE 10 times higher than Arizona's are discarded\nfrom calculation, 0.298 when control states with pre-treatment MSPE 5 times higher than\nArizona's are discarded from calculation, and 0.423 when control states with pre-treatment\nMSPE 2 times higher than Arizona's are discarded form calculation.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.caption = element_text(hjust = 0),
    legend.position = c(0.95, 0.05),
    legend.justification = c("right", "bottom"),
    legend.background = element_rect(color = "black", fill = "white", size = 0.5),
    legend.title = element_text(size = 8),
    legend.text = element_text(size = 8),
    legend.key.width = unit(1.5, "cm"),
    plot.margin = unit(c(1,3,0,0), "lines")
  )

# Display plot
synth_control_plot_AZ_backdated

ggsave(
  filename = "Backdated_SynthControlPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_plot_AZ_backdated,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Plot the Gaps in Arizona Contributions (Backdating)

# Calculate the gap between actual and synthetic values
synthAZ_gaps_backdated <- real_AZ_median_contributions_backdated - synth_AZ_median_contributions_backdated

# Create data frame
df_synthAZ_gaps_backdated <- data.frame(
  year = years,
  gap = synthAZ_gaps_backdated
)

# Plot
synth_control_gapsplot_AZ_backdated <- ggplot(df_synthAZ_gaps_backdated, aes(x = year, y = gap)) +
  geom_line(size = 1) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2015.5, linetype = "dotted") +
  annotate("text", x = 2014.95, y = -60000, 
           label = "Artificial Adoption of the\nUniversal Charitable Deduction", 
           hjust = 1, size = 2, family = "Times New Roman", lineheight = 0.8) +
  annotate("segment", x = 2015, xend = 2015.4, y = -60000, yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")), color = "black") +
  scale_y_continuous(labels = scales::label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(years), max(years), by = 1)) +
  labs(
    x = "\nYear\n",
    y = "\nGap in Median Contributions\n",
    caption = "Note: Associated p-values are approximately 0.250 when all control states are included in calculation,\n0.275 when control states with pre-treatment MSPE 10 times higher than Arizona's are discarded\nfrom calculation, 0.298 when control states with pre-treatment MSPE 5 times higher than\nArizona's are discarded from calculation, and 0.423 when control states with pre-treatment\nMSPE 2 times higher than Arizona's are discarded form calculation.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    plot.caption = element_text(hjust = 0),
    plot.margin = unit(c(2,3,0,0), "lines")
  )

# Display the plot
synth_control_gapsplot_AZ_backdated

ggsave(
  filename = "Backdated_SynthControlGapsPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_gapsplot_AZ_backdated,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Generate Arizona v. Synth. Arizona Median Contributions Comparison Table (Backdating)

# Create a nicely formatted comparison table
contributions_comparison_backdated <- data.frame(
  Year = years,
  `Arizona (Observed)` = paste0("$", format(round(real_AZ_median_contributions_backdated, 0), big.mark = ",")),
  `Synthetic Arizona` = paste0("$", format(round(synth_AZ_median_contributions_backdated, 0), big.mark = ",")),
  `Difference` = paste0(
    "$",
    format(
      round(real_AZ_median_contributions_backdated - synth_AZ_median_contributions_backdated, 0),
      big.mark = ",", scientific = FALSE
    )
  )
)

# Display table
datasummary_df(
  contributions_comparison_backdated,
  title = "Observed vs. Synthetic Median Contributions to Arizona Nonprofits (2013–2023)\nUsing Backdated (Average) Pre-Treatment Outcomes",
  output = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/Backdated_AZObservedVsSynthetic.docx"
)
## NULL

Backdating is somewhat concerning in this case, but it also is not very useful. When I push it back even to just 2016, that means the model is fitting on only 3 years of pre-treatment data, which is not enough. No need to show this in the paper or appendix.

Hypothesis Testing

placebos_backdated <- generate.placebos(
  dataprep.out = data_prep_out_backdated,
  synth.out = synth_out_backdated,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 70971.31 
## 
## solution.v:
##  0.03895915 0.00516837 0.01408187 0.0001106551 0.001037946 0.0007687903 0.01108061 2.42066e-05 0.0001006788 0.01930918 0.002537678 0.7409507 0.09460505 0.07126514 
## 
## solution.w:
##  4.1027e-05 2.003e-06 8.021e-07 3.1122e-06 7.025e-07 9.1e-09 4.2e-08 1.4592e-06 6.3432e-06 1.19005e-05 4.9862e-06 5.2317e-06 1.126e-06 4.305e-07 8.8554e-06 4.8372e-06 0.0008965614 1.0257e-06 1.1137e-06 3.072e-07 6.32566e-05 7.79e-07 0.2814521 2.5607e-05 0.01603224 1.3406e-06 3.178e-06 2.83698e-05 6.634e-07 5.918e-07 4.785e-07 0.2871281 1.5188e-06 1.8387e-06 6.5053e-06 1.0441e-06 6.1226e-06 1.1985e-06 1.2865e-06 2.0101e-06 0.4142495 3.978e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1913979 
## 
## solution.v:
##  0.0001303296 9.71217e-05 0.04068189 0.0001133033 1.64e-06 0.03556033 0.0003040942 0.0003118076 0.00190713 3.67149e-05 0.0411788 0.252594 0.2468408 0.3802421 
## 
## solution.w:
##  0.001290528 1.26644e-05 7.0245e-06 1.1744e-05 5.8139e-06 0.0004579256 4.0712e-06 3.0733e-05 0.0003516154 0.6017278 3.32668e-05 2.7297e-05 1.58612e-05 3.8249e-06 2.09e-05 0.0004649729 0.0001551612 3.415e-06 9.20809e-05 7.3511e-06 1.47439e-05 7.8098e-06 0.1757514 7.4875e-06 6.9102e-06 0.008351934 5.99573e-05 0.1027873 3.5219e-06 5.04873e-05 2.24587e-05 1.17883e-05 4.20054e-05 0.000520141 8.97861e-05 5.4381e-06 0.1074872 5.678e-06 6.8224e-06 1.19986e-05 2.68733e-05 4.2542e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 48295.11 
## 
## solution.v:
##  0.2878988 0.1159398 0.05439956 0.03457411 3.57015e-05 0.005528647 0.002520127 0.05761668 0.008267218 0.1230519 0.1156441 0.1296019 0.03861353 0.02630797 
## 
## solution.w:
##  8.1e-09 2.92e-08 2.17e-08 5.77e-08 0.2670243 1.48e-08 2.48e-08 4.12e-08 1.49e-08 7.1e-09 1.85e-08 3.41e-08 1.8e-08 1.21e-08 1.81e-08 1.77e-08 1.49e-08 6.2e-09 4.391e-07 4.6e-09 7.1e-09 3.1e-08 0.02600701 2.03e-08 2.1e-09 6.179e-07 4.01e-08 1e-08 4.18e-08 5.45e-08 1.228e-07 0.2620014 1.07e-08 1.83e-08 0.2710895 0.1738757 6.27e-08 2.3e-09 1.582e-07 1.86e-08 6.9e-09 2.2e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3722513 
## 
## solution.v:
##  0.01572275 0.01385157 0.0336245 0.05756247 0.08618161 0.1251663 0.09273427 0.09424625 0.07341517 0.02034466 0.08675055 0.1501309 0.0460558 0.1042132 
## 
## solution.w:
##  6.288e-07 1.8076e-06 9.06112e-05 2.3912e-06 5.85299e-05 0.1981469 2.38439e-05 1.94096e-05 5.769e-07 0.001417419 2.6453e-06 1.4594e-06 1.848e-07 0.2618946 1.0433e-06 1.0098e-06 1.9057e-06 3.407e-07 1.1497e-06 0.01270232 7.658e-07 0.2971776 0.01978338 1.7657e-06 2.587e-07 0.05968403 8.342e-07 1.3794e-06 0.0003528567 2.1675e-06 0.01168806 1.2627e-06 8.404e-07 3.488e-07 3.2547e-06 0.1367505 5e-10 2.8268e-06 0.0001636447 7.511e-07 4.734e-07 1.41501e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 614091.7 
## 
## solution.v:
##  0.2530832 0.1013915 0.01606293 0.1181557 0.0004095031 1.85867e-05 0.05275598 0.0005696331 0.005692977 0.003381997 0.08762343 0.1118502 0.1959578 0.05304665 
## 
## solution.w:
##  0.0001378829 8.44579e-05 0.2838622 8.43624e-05 5.55025e-05 7.50863e-05 0.044182 4.87163e-05 2.31683e-05 3.48583e-05 0.0002462765 3.68851e-05 7.12868e-05 4.42423e-05 0.2047706 4.75541e-05 3.84114e-05 9.3505e-06 4.75987e-05 0.1286215 4.26441e-05 0.0007661905 0.01523009 7.06221e-05 2.791e-07 0.0001305024 3.1397e-05 0.04078246 0.1276812 7.24285e-05 3.82276e-05 5.0799e-05 3.53941e-05 0.1393375 0.0004882576 2.64899e-05 4.3021e-05 0.007993388 0.00371721 5.04486e-05 8.90924e-05 0.0008003351 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17468842 
## 
## solution.v:
##  8.12153e-05 2.7862e-06 6.0675e-06 3.90428e-05 1.0459e-06 0.3785708 1.95319e-05 0.004365569 1.426e-06 0.1393679 3.8893e-06 0.04433583 0.2181383 0.2150666 
## 
## solution.w:
##  4.56e-08 4.72e-08 5.61e-08 3.812e-07 8.4e-08 6.26e-08 1.533e-07 1.934e-07 1.457e-07 5.49e-08 7.3e-08 1.591e-07 1.429e-07 3.9839e-06 1.206e-07 1.096e-07 4.47e-08 6.26e-08 1.101e-07 2.017e-07 6.98e-08 1.071e-07 3.74e-08 5.74e-08 3.4e-09 0.2008694 1.095e-07 8.18e-08 1.005e-07 1.43e-07 2.8738e-06 6.93e-08 5.912e-07 7.62e-08 7.92e-08 0.2491864 6.92e-08 3.001e-07 1.783e-07 7.68e-08 5.75e-08 0.5499329 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 32369121 
## 
## solution.v:
##  0.006170533 0.000586731 0.1213016 0.0147139 0.0001306827 0.002451625 0.0004475348 0.001163498 0.0268324 0.001331867 0.05772945 0.2084626 0.4313569 0.1273208 
## 
## solution.w:
##  9.1e-09 1.87e-08 2e-09 8.4e-09 3.3e-09 1e-10 3e-09 3.1e-09 4.2e-09 7.24e-08 2.8e-08 7.1e-09 1.24e-08 5.1e-09 7.4e-09 4.7e-09 5.6e-09 2.3e-09 3.8e-09 3.3e-09 1.49e-08 4.11e-08 0.9999996 5.6e-09 8e-10 2e-09 1.02e-08 2.3e-09 3.3e-09 1.36e-08 2.47e-08 4.2e-09 1.06e-08 2.6e-09 2.5e-09 4e-10 8.5e-09 2.7e-09 1.8e-09 4.07e-08 1.21e-08 3e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 14342911 
## 
## solution.v:
##  0.001070588 0.0006254888 0.0035375 2.19917e-05 0.004747588 0.00506655 0.002190008 0.02087683 4.9564e-06 0.01547207 0.0004836358 0.2932342 0.3100263 0.3426423 
## 
## solution.w:
##  2.7579e-06 3.0044e-06 9.166e-07 5.791e-07 6.57e-08 1.48e-06 4.674e-07 1.4548e-06 6.633e-07 3.0379e-06 2.4405e-06 0.3280782 1.3217e-06 1.3031e-06 1.539e-07 7.86e-07 2.6337e-06 3.4529e-06 3.41188e-05 3.19e-07 4.151e-07 5.905e-07 4.874e-07 0.0003407999 1.70024e-05 2.809e-07 5.253e-07 3.419e-07 0.000584509 7.335e-07 4.4965e-06 1.4236e-06 1.4114e-06 0.0005542442 6.986e-07 0.00108213 4.46e-07 4.886e-07 0.6640604 1.4846e-06 4.2956e-06 0.005203606 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22177119 
## 
## solution.v:
##  1.98423e-05 0.03981559 0.06047562 0.2265891 0.07641305 0.03414985 0.0001359809 0.01872422 0.01541145 0.001046865 0.3605806 0.03353734 0.04228493 0.09081555 
## 
## solution.w:
##  2.4349e-06 8.3756e-06 1.41075e-05 3.1097e-06 4.7027e-06 0.1906957 2.2377e-06 4.9318e-06 5.68e-06 0.1190183 4.2435e-06 0.0004845076 1.5242e-06 2.4e-09 3.7702e-06 3.972e-05 2.617e-07 9.797e-07 2.01299e-05 0.08199828 2.1638e-06 1.5516e-06 5.2928e-06 3.0727e-06 1.8999e-05 0.2179663 4.7178e-06 1.66319e-05 1.9548e-06 0.05666575 1e-10 3.5585e-06 0.150242 5.1276e-06 0.1826984 1.03071e-05 1.8273e-06 1.4363e-06 5.9987e-06 1.5256e-06 1.9491e-05 1.09189e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4219.99 
## 
## solution.v:
##  0.02371602 0.002555772 0.004116011 0.0008904827 0.003084401 0.000660411 0.001311891 0.004867958 0.002549791 0.00326686 0.006327643 0.2859701 0.2496803 0.4110024 
## 
## solution.w:
##  1.67138e-05 7.3937e-06 3.35013e-05 1.1315e-05 1.53526e-05 2.14593e-05 2.5137e-05 8.7161e-06 1.13092e-05 6.311e-06 1.17672e-05 0.0007002214 1.19844e-05 6.5499e-06 0.001267616 0.5756789 2.3844e-06 1.87672e-05 1.67918e-05 1.03e-08 0.07052209 1.45429e-05 1.3383e-06 7.28868e-05 0.07230764 0.01673704 0.0001063136 0.08670672 2.82686e-05 3.3868e-06 5.3114e-06 7.7969e-06 0.07742114 1.05083e-05 2.17674e-05 6.12764e-05 1.46251e-05 2.80233e-05 0.006056697 6.0663e-05 2.08414e-05 0.09191893 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 33991806 
## 
## solution.v:
##  4.4385e-06 0.005575212 0.03284906 6.64898e-05 0.0001852344 0.0002142083 0.0005151039 0.0001850622 1.8154e-06 0.0001565703 0.013753 0.3085608 0.2398041 0.3981289 
## 
## solution.w:
##  4.17e-08 0.9999871 9.15e-08 5.13e-08 7.03e-08 8.68e-08 2.629e-07 1.043e-07 1.645e-07 1.211e-07 3.17e-08 8.74e-08 1.396e-07 5.98e-08 5.15e-08 9.06e-08 3.845e-07 2.517e-07 1.79e-07 1.91e-08 7.4e-09 1.67e-08 0 6.718e-07 3.731e-06 1.236e-07 4.85e-08 5.36e-08 8.54e-08 4.12e-08 4.4469e-06 5.19e-08 1.475e-07 1.486e-07 8.37e-08 1.67e-07 7.86e-08 5.29e-08 8.69e-08 6.18e-08 4.166e-07 1.192e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4015564 
## 
## solution.v:
##  0.006768196 0.001367757 0.007547529 0.003302818 0.01073035 0.001773198 0.02926065 1.69599e-05 0.0002116578 4.06763e-05 0.0104631 0.2857996 0.2488807 0.3938368 
## 
## solution.w:
##  1.57504e-05 0.1340166 3.7713e-06 3.8958e-06 6.5622e-06 1.7667e-06 0.3150678 0.18356 4.3622e-06 4.1336e-06 2.6615e-06 0.0004879203 5.023e-06 1.4627e-06 0.001318525 9.8866e-06 2.2173e-06 8.022e-07 9.4813e-06 0.1099168 1.7818e-06 0.2267887 0.02867433 2.2172e-06 7.935e-07 2.8439e-06 1.08628e-05 5.392e-06 2.3901e-06 8.2149e-06 4.4615e-06 4.1499e-06 2.03091e-05 6.4953e-06 6.3841e-06 1.3994e-06 2.277e-06 8.3034e-06 5.4604e-06 2.0472e-06 1.31e-08 1.737e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15656748 
## 
## solution.v:
##  0.0013524 0.006293175 0.0005708165 0.01237972 0.01824449 0.000441094 0.0004111249 0.0001269187 3.70841e-05 0.0008939844 0.007025133 0.2914937 0.2520963 0.4086341 
## 
## solution.w:
##  0.001005903 0.001153066 5.10895e-05 2.93001e-05 2.83631e-05 4.7693e-06 0.08909129 0.4897376 5.65061e-05 0.001271112 0.0001295743 0.0001896113 7.54457e-05 8.3902e-06 0.4120751 0.00024599 6.27536e-05 2.94334e-05 0.0002980423 6.5632e-06 9.15426e-05 1.68291e-05 1.05257e-05 0.0003009348 3.78974e-05 2.98188e-05 0.00109693 4.29093e-05 7.22552e-05 5.18176e-05 0.0001627586 2.07319e-05 0.001251821 7.47432e-05 5.46703e-05 3.51238e-05 9.02635e-05 3.6394e-06 0.0002162816 0.0005527822 0.0002356175 1.775e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8841532 
## 
## solution.v:
##  0.002761597 0.007334913 0.001612721 0.01414305 0.03904193 0.000781281 0.0004037852 0.006819402 0.0002476662 1.3806e-05 1.91859e-05 0.2833363 0.2443751 0.3991093 
## 
## solution.w:
##  7.83873e-05 5.51105e-05 3.43076e-05 4.11732e-05 0.0001088891 1.54444e-05 0.09502196 0.03014281 3.98108e-05 4.46873e-05 0.108263 6.81738e-05 3.66407e-05 1.4374e-06 0.0004508961 5.1462e-05 3.34585e-05 0.0001101677 3.93694e-05 0.1076689 4.15825e-05 4.26147e-05 1.58e-08 3.71826e-05 2.19968e-05 5.19258e-05 4.49669e-05 2.45021e-05 0.0001387458 3.58399e-05 6.20047e-05 3.54474e-05 0.6496095 7.81298e-05 3.1287e-05 5.20725e-05 0.0006684534 3.71903e-05 4.38516e-05 0.0001909288 0.00643854 7.1321e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 132373.5 
## 
## solution.v:
##  0.002593429 0.00193088 0.006823109 0.01877731 0.004389313 0.00424945 3.9978e-05 0.0009477555 0.0009217709 0.00617452 4.22953e-05 0.2932109 0.2544978 0.4054015 
## 
## solution.w:
##  1.724e-07 2.578e-07 2.135e-07 0.4468668 3.113e-07 1.9644e-06 6.53e-07 1.4351e-06 1.2221e-06 1.853e-07 4.52363e-05 4.666e-07 4.106e-07 2.2754e-06 2.212e-07 2.757e-07 1.7018e-06 0.09826343 4.465e-07 0.2074807 4.639e-07 6.43e-08 2.821e-07 9.471e-07 5.373e-07 3.416e-07 2.254e-07 9.89e-08 2.32e-07 1.4301e-06 0.0005921152 2.685e-07 2.8907e-06 4.317e-07 2.678e-07 4.697e-07 2.191e-07 0.2467286 2.104e-07 4.062e-07 8.535e-07 2.021e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 694582.4 
## 
## solution.v:
##  0.0258355 0.0004730019 0.01929812 3.19554e-05 0.004451894 0.0004164438 0.006325699 8.427e-07 0.0002153655 0.003741968 0.004210643 0.2820873 0.2470848 0.4058265 
## 
## solution.w:
##  0.0003622405 4.27002e-05 9.98248e-05 8.0451e-06 0.001039578 1.74774e-05 2.4e-09 0.0001778609 2.07229e-05 4.56217e-05 7.1963e-06 0.0001120824 0.5729808 2.94576e-05 4.4196e-06 8.66817e-05 1.92898e-05 2.14413e-05 4.48157e-05 0.2337215 6.496e-06 0.1338107 0.0002593809 2.08925e-05 2.2231e-05 3.20141e-05 0.000262098 0.000269924 0.0001508654 1.91781e-05 6.701e-06 0.0002811315 3.1454e-06 8.77012e-05 7.31221e-05 3.03847e-05 2.43772e-05 0.05538457 0.0002903425 2.726e-05 5.91886e-05 3.64649e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10521299 
## 
## solution.v:
##  0.1569871 0.2425542 0.009421663 0.03040795 0.0161254 0.0004529344 0.1216443 0.08928757 0.007726177 0.007309952 0.08941188 0.01399357 0.02025536 0.1944219 
## 
## solution.w:
##  3.1486e-06 0.01333557 1.06517e-05 8.5831e-06 1.22963e-05 3.2272e-06 4.7903e-06 5.7156e-05 9.14691e-05 0.2963414 5.4557e-06 8.7989e-06 0.1073 2.68014e-05 5.6247e-06 1.05462e-05 0.1355186 3.8712e-06 0.0001429475 0.01526754 1.8805e-06 7.6712e-06 1.75256e-05 3.4893e-06 5.3e-09 7.2988e-06 0.09455005 2.7928e-06 8.1842e-06 0.00025552 1.73391e-05 9.9068e-06 2.76045e-05 0.2312886 1.74642e-05 7.5884e-06 9.3607e-06 3.8607e-06 8.8912e-06 7.2557e-06 0.1055822 7.0468e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1257582 
## 
## solution.v:
##  0.002860661 0.001544791 0.0005931984 0.002027383 0.002084156 0.005776621 0.01230431 0.0001868049 0.002351879 0.01038546 0.06068949 0.3534478 0.2383825 0.307365 
## 
## solution.w:
##  9.055e-07 2.6974e-06 2.14481e-05 1.51483e-05 2.47328e-05 1.36876e-05 1.98e-08 1.26924e-05 4.58916e-05 3.43237e-05 0.2552407 1.60712e-05 3.61464e-05 2.94102e-05 2.80331e-05 2.09613e-05 4.93862e-05 0.0001331628 3.88911e-05 1.13753e-05 0.2144432 2.16871e-05 0.26292 5.9556e-05 0.2653853 2.43018e-05 0.0001149306 1.71361e-05 1.23648e-05 9.6572e-05 4.50928e-05 0.0003867689 2.71832e-05 4.28236e-05 1.63852e-05 1.14847e-05 4.53407e-05 8.7978e-06 1.00991e-05 0.0001071942 0.0004232872 4.8494e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11182364 
## 
## solution.v:
##  0.002594696 0.05413129 0.0001463524 0.02979772 7.10616e-05 3.73764e-05 0.02641014 0.008523745 0.0009542645 0.009869617 4.4156e-06 0.2858612 0.2190554 0.3625428 
## 
## solution.w:
##  1.08823e-05 2.68843e-05 7.383e-06 0.0003449965 5.2417e-06 1.7756e-06 3.45992e-05 5.8633e-06 9.1006e-06 1.5e-09 4.38507e-05 1.73141e-05 3.4925e-06 1.48929e-05 0.0005108259 4.3744e-06 5.2051e-06 3.06957e-05 8.4338e-06 0.1466648 0.278066 0.0009654678 4.1496e-05 3.44928e-05 0.3677391 4.0743e-05 1.25826e-05 1.5328e-06 1.7447e-05 6.08522e-05 3.88252e-05 8.7104e-06 4.1156e-06 3.0086e-06 3.3508e-06 4.7e-09 5.05085e-05 3.2077e-06 2.6906e-06 0.0001434979 0.0002254868 0.2047862 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3987.597 
## 
## solution.v:
##  0.06220399 0.004698761 7.36869e-05 0.1058934 0.04117602 0.1320715 0.04210438 0.01273175 9.21846e-05 0.0008296124 5.08113e-05 0.3677824 0.130041 0.1002504 
## 
## solution.w:
##  8.39817e-05 0.2490028 0.0003620646 0.0002739678 0.0002240816 0.000111893 0.0001476781 0.2771547 0.002332841 0.01973278 0.0001608958 0.0002433883 0.05764814 0.000154381 0.000178897 0.0002033996 0.002307888 0.01980658 0.0001400594 0.0001807445 0.0001553261 0.0001811308 0.0003277656 9.99186e-05 0.05961359 0.0002307603 0.0006286969 0.00165476 0.0001419172 0.0006046405 0.0007514815 0.000469699 0.0005767658 0.0159824 0.1872322 0.09757854 0.000173392 0.0001001205 0.0001868866 0.0001904657 0.000239248 0.002429167 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15966861 
## 
## solution.v:
##  0.000262978 0.0001294461 0.005177958 0.001608877 0.007364125 0.009428238 0.000412011 0.002199603 0.01601949 0.005398926 0.0007097147 0.3118007 0.2514324 0.3880555 
## 
## solution.w:
##  1.03561e-05 4.7212e-06 2.4706e-06 2.08846e-05 7.6356e-06 3.1942e-06 0.0003281713 1.08532e-05 7.0971e-06 7.4747e-06 5.0024e-06 0.000200334 7.1428e-06 8.9044e-06 0.0009220117 6.11456e-05 1.49441e-05 6.7658e-06 4.0254e-06 7.2196e-06 0.0004023556 0.8479161 3.5e-09 4.4422e-06 2.0338e-06 2.8253e-06 0.0001585549 0.1170342 4.643e-06 6.116e-07 4.7289e-06 4.807e-07 0.03261457 7.5204e-06 4.2373e-06 2.1989e-06 3.7266e-06 0.0001729157 3.7425e-06 8.4766e-06 9.1225e-06 2.1125e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16453824 
## 
## solution.v:
##  0.02010025 0.1768706 0.02743141 0.0001680451 0.04008758 0.1091397 0.003786133 0.1469741 0.03365223 0.1343711 0.004281795 0.05634642 0.1097503 0.1370405 
## 
## solution.w:
##  0.01028813 7.21e-08 1.57e-08 6.16e-08 7.45e-08 1.035e-07 0.4307398 2.55e-08 7.19e-08 2.09e-07 0.1918088 4.081e-07 4.1e-07 3.4e-08 2.543e-07 1.015e-07 1.653e-07 4.149e-07 0.06436045 7.83e-08 0.2656938 1.35e-08 3.69e-08 1.7462e-06 9.361e-07 1.96e-08 1.761e-07 0.03708439 4.62e-08 4.19e-08 4.01e-08 6.266e-07 9.8409e-06 5.3e-09 1.014e-07 4e-09 4.05e-08 1.103e-07 3.04e-08 1.107e-07 3.924e-07 7.7704e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5517619 
## 
## solution.v:
##  0.06126941 0.116397 0.2472117 0.00406969 0.006554819 0.001261096 0.001351198 0.0012853 0.0146046 0.0006103513 0.007206824 0.3596989 0.07182852 0.1066506 
## 
## solution.w:
##  4.428e-07 4.979e-07 1.0924e-06 0.002545777 1.5317e-06 2.1612e-06 0.5062837 4.997e-07 1.252e-06 1.4837e-06 5.362e-07 1.9902e-06 1.4012e-06 3.7706e-06 0.3657417 2.37758e-05 1.1093e-06 2.809e-07 1.0992e-06 6.064e-07 0.08306522 8.393e-07 0 2.3047e-06 4.906e-07 6.25858e-05 2.6875e-06 7.405e-07 2.5376e-06 0.04001254 0.0003965903 4.367e-07 1.9831e-06 5.746e-07 5.681e-07 6.326e-07 6.851e-07 0.0005632465 2.6101e-06 0.001264807 2.448e-06 7.803e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16783748 
## 
## solution.v:
##  0.003277143 0.0008516605 0.004031093 0.0004035012 0.002317371 0.0002727572 0.0002471597 8.70767e-05 2.7906e-06 0.002119943 0.00558041 0.3005492 0.2600486 0.4202113 
## 
## solution.w:
##  3.3465e-06 4.529e-07 1.416e-07 6.348e-07 3.402e-07 2.55e-08 0.8001241 1.109e-07 1.576e-07 1.989e-07 5.13e-08 7.458e-07 1.742e-07 2.654e-07 5.503e-07 3.89e-07 3.436e-07 3.1e-09 1.823e-07 1.674e-07 2.84289e-05 0.1998221 9.412e-06 8.92e-08 3.67e-08 1.329e-07 7.175e-07 5.438e-07 1.981e-07 2.1777e-06 1.202e-07 1.0624e-06 1.49e-07 1.8e-07 2.089e-07 1.4e-08 8.837e-07 1.83e-07 7.47e-08 5.468e-07 3.479e-07 6.1e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 103083.4 
## 
## solution.v:
##  6.978e-07 0.009912243 0.001206651 0.001162964 1.7759e-06 0.01371275 0.07251144 0.01357432 0.2027526 0.002461052 0.01758059 0.2523645 0.3233576 0.08940087 
## 
## solution.w:
##  2.03198e-05 2.12761e-05 3.97832e-05 0.0001692792 1.31507e-05 0.004422755 0.0001287083 0.04850429 1.35528e-05 8.8697e-06 0.197047 4.17149e-05 0.2454027 1.91634e-05 0.0007584581 2.85793e-05 1.09467e-05 0.0002455956 0.001535655 7.6238e-06 1.89025e-05 8.22302e-05 0.0006927247 7.94738e-05 0.2400852 1.38944e-05 0.000109677 7.1091e-06 0.000500222 4.87931e-05 0.1367607 0.0002734675 2.8444e-06 2.5978e-06 5.6011e-06 0.005026966 2.43964e-05 0.0008373659 2.98886e-05 0.0002279018 0.000289273 0.1164414 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 125092875 
## 
## solution.v:
##  0.001581306 0.0002318146 0.03880528 0.02420428 0.004974285 0.0009607816 0.0147196 0.01472126 0.1494176 0.006012055 0.02120968 0.3316785 0.1488528 0.2426308 
## 
## solution.w:
##  1.6002e-06 3.8341e-06 1.8879e-06 4.452e-07 1.503e-06 1.7e-09 2.96e-07 9.593e-07 1.9324e-06 2.3445e-06 0.1715639 5.177e-07 5.489e-07 6.252e-07 4.868e-07 5.557e-07 1.3541e-06 8.49909e-05 0.0001208705 2.1048e-06 3.538e-07 6.033e-07 3.379e-07 4.357e-07 2.22895e-05 1.144e-06 6.051e-07 2.4041e-06 1.1911e-06 5.98e-07 8.249e-07 9.433e-07 4.052e-07 1.54543e-05 2.7504e-06 0.5025339 1.2183e-06 3.212e-07 1.0612e-06 9.938e-07 1.9961e-06 0.3256194 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2213198 
## 
## solution.v:
##  0.1069448 0.02881396 0.04223182 0.03065707 0.05764299 0.1600174 0.01244728 0.002461421 0.0127083 0.1288206 0.0001557765 0.1275874 0.149294 0.1402171 
## 
## solution.w:
##  1.6e-09 2.9e-09 8.7e-09 2e-10 5.4e-09 0.2869913 5e-10 1.3e-09 1.42e-08 6.5e-09 1.6e-09 1.9e-09 1.8e-09 1.125e-07 0 6.2e-09 4.7e-09 1.7e-09 2.3e-09 3.2e-09 4.2e-09 7e-10 3.4e-09 2.3e-09 1.5e-09 1.4e-09 2.8e-09 3.3e-09 3.2e-09 5.7e-09 6.6e-09 1.3e-09 5.3e-09 3.9e-09 3.6e-09 0.2258781 0.4871303 6e-09 1.1e-08 2.5e-09 1.2e-09 3e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 43387.54 
## 
## solution.v:
##  0.01521324 0.004684449 0.005717772 0.0004904781 0.001199552 0.004059598 1.3702e-05 0.001003406 0.0004334729 0.002241439 0.02526568 0.2953469 0.2454204 0.3989099 
## 
## solution.w:
##  0.003633091 0.0007206361 7.5112e-06 6.20072e-05 7.6153e-06 8.3124e-06 0.00652721 5.57e-08 2.90926e-05 0.0004321987 9.2027e-05 0.002651825 0.2328562 2.79553e-05 9.9635e-06 0.159891 0.001045975 0.0001970236 4.42456e-05 3.31958e-05 0.09678863 0.000428383 0.06233177 0.06081752 7.27695e-05 5.96916e-05 1.61902e-05 0.07857629 1.73199e-05 0.2911469 7.33e-08 3.9452e-05 8.50381e-05 4.19175e-05 2.31684e-05 9.6952e-06 8.55482e-05 1.23649e-05 1.00823e-05 0.0004566803 0.0006634782 3.9859e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8105639 
## 
## solution.v:
##  0.001798819 0.002521389 0.0001871714 0.000156624 0.01166956 0.0002298229 1.5033e-06 5.52791e-05 0.0240121 0.01896653 0.003351474 0.2907205 0.2459273 0.4004019 
## 
## solution.w:
##  1.4777e-06 1.0727e-06 7.817e-07 6.5532e-06 3.369e-07 0.000420431 1.3171e-06 2.882e-07 1.2092e-06 1.8051e-06 8.675e-07 9.469e-07 5.98e-07 7.107e-07 1.78829e-05 1.349e-07 1.5159e-06 1.4572e-06 0.06509561 9.887e-07 0.1473507 0.0007659051 2.946e-07 9.7506e-06 6.971e-07 6e-10 3.4915e-06 9.044e-07 1.3282e-06 1.5118e-06 5.987e-07 0.4952347 7.09e-07 1.0109e-06 0.07694437 6e-10 7.2027e-06 1.02332e-05 9.669e-07 1.0607e-06 6.441e-07 0.2141079 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 313833.6 
## 
## solution.v:
##  0.008363127 0.01238485 8.03203e-05 0.006706381 0.0007176922 0.005736871 1.0182e-05 8.69784e-05 0.003074641 0.01133029 0.005612418 0.290065 0.2506207 0.4052105 
## 
## solution.w:
##  0.08699952 0.002013455 0.1954095 0.001396033 0.005379326 0.0002328082 0.002196533 0.005705952 0.0007788889 0.003652951 0.000420754 0.001133417 0.002317295 0.0007254587 0.0005629385 0.1163107 0.001925735 0.0008526163 0.0007520666 0.0008773791 0.0009325107 0.00108186 0.00216244 0.001458079 0.0007241507 0.000350334 0.0005788904 0.01142141 0.01019677 0.001172695 0.000576875 0.1267192 0.0005439583 0.0007114796 0.001855618 0.0007955685 0.002359883 0.0002714487 0.3961528 0.003731894 0.0007090668 0.005849744 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4472056 
## 
## solution.v:
##  0.006310573 4.65e-07 0.01189671 0.003298885 0.007257583 0.0004397707 5.46569e-05 0.00428545 4.9e-09 0.001640269 2.4105e-06 0.2952873 0.2563833 0.4131426 
## 
## solution.w:
##  0.0001397014 0.2013088 0.0001753071 0.00030143 0.0001519667 8.60343e-05 0.006121859 7.82018e-05 0.0008943661 0.004284993 0.0006393466 0.000184024 0.000264305 0.0002364719 8.62704e-05 0.0001977375 0.001884692 2e-10 5.17121e-05 0.0002886318 0.3466479 0.2703346 7.28704e-05 0.008133851 7.15027e-05 2.99386e-05 0.02153074 0.001184474 0.0005929372 8.58833e-05 0.1273814 0.000160434 0.0007384808 0.0001962346 0.0002698734 8.75125e-05 0.004685537 7.53214e-05 0.0001092802 0.0001481081 4.28853e-05 4.43278e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19631670 
## 
## solution.v:
##  0.02367293 0.009478705 0.0317261 0.01962168 0.004352932 0.002093197 0.002942126 0.02413285 0.00468353 0.002364888 3.51119e-05 0.2696744 0.2221934 0.3830282 
## 
## solution.w:
##  7.111e-07 2.0054e-06 1.9158e-06 0.3138488 1.5836e-06 1.62373e-05 4.776e-07 0.09519907 6.7975e-06 1.5757e-06 0.4910764 1.4868e-06 1.7307e-06 6.6438e-06 0.001051533 1.7395e-06 1.5221e-06 1.036e-06 1.7656e-06 2.5292e-06 1.2771e-06 4.874e-07 0.0008414377 3.355e-07 1.1794e-06 8.1681e-06 0.0002049437 1.2646e-06 8.994e-07 2.3661e-06 0.0003895941 7.065e-07 3.921e-06 1.4691e-06 1.1867e-06 0.0972878 6.929e-07 2.0879e-06 4.7673e-06 3.6008e-06 4.2588e-06 1.1997e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7906444 
## 
## solution.v:
##  0.007181275 0.00118634 0.001350348 0.01292937 0.0006722669 0.0287411 0.007331135 0.01538788 1.65635e-05 0.00920957 0.002216364 0.2769717 0.248984 0.387822 
## 
## solution.w:
##  0.1113695 3.0074e-06 2.3412e-06 1.11995e-05 1.1006e-06 4.4603e-06 1.49792e-05 1.7091e-06 2.1757e-06 2.1992e-06 2.7396e-06 2.44659e-05 0.4081709 1.2354e-06 8.03603e-05 1.0331e-06 2.3913e-06 1.46517e-05 1.59472e-05 2.2207e-06 2.05385e-05 0.0005104238 0.009382706 0.09560014 1.75444e-05 3.128e-06 1.4019e-06 9.95297e-05 0.3466298 7.561e-07 5.3867e-06 2.1381e-06 1.8692e-06 6.458e-07 1.6e-09 1.5021e-06 2.1327e-06 0.02781596 1.7121e-06 1.08149e-05 6.5943e-06 0.0001566324 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 469132.6 
## 
## solution.v:
##  0.001299421 0.01846957 0.0001547749 0.004819447 0.01160565 3.19879e-05 0.001832796 0.009080867 0.0004305448 0.001121845 3.23299e-05 0.2842667 0.2602479 0.4066061 
## 
## solution.w:
##  5.4564e-06 5.1436e-06 1.20296e-05 1.22509e-05 1.49733e-05 0.002496791 1.5527e-06 1.6e-09 0.0002010534 0.000154326 5.09083e-05 3.3347e-06 0.2180949 0.7107038 2.57571e-05 6.1288e-06 4.65494e-05 1.34389e-05 3.38229e-05 1.15051e-05 2.73072e-05 3.97577e-05 4.0527e-06 4.1443e-06 1.30038e-05 5.40027e-05 5.95821e-05 1.24674e-05 3.85054e-05 6.5361e-06 1.00514e-05 1.60004e-05 1.10392e-05 0.01434978 3.1793e-05 0.05336359 1.16377e-05 2.24571e-05 6.6497e-06 7.5274e-06 1.84e-08 1.64181e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9287449 
## 
## solution.v:
##  0.0001769434 0.0107946 1.84855e-05 0.001575168 0.0005900294 0.09407173 0.1990002 2.55595e-05 0.004168101 0.3084644 0.01451134 0.05221386 0.007260671 0.3071289 
## 
## solution.w:
##  0.2686757 7.7648e-06 1.0765e-06 7.7424e-06 0.000912496 3.56603e-05 1.04358e-05 8.5e-08 1.73314e-05 6.23493e-05 9.7121e-06 2.11484e-05 0.000122506 2.34657e-05 1.38129e-05 0.1600412 5.87875e-05 1.51574e-05 0.0001904261 8.7648e-05 2.03912e-05 1.67882e-05 7.5735e-06 5.856e-07 3.92556e-05 0.1453762 3.7621e-06 4.26833e-05 0.0001057421 4.47e-07 1.0688e-05 8.4505e-06 0.0001548232 3.86783e-05 5.27017e-05 0.2988896 1.34272e-05 0.1246487 2.24808e-05 2.05955e-05 7.33782e-05 0.0001385776 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11233122 
## 
## solution.v:
##  0.04855379 0.05596836 0.06681857 0.05893817 7.14031e-05 0.05044612 0.1385 0.01880568 0.03594602 0.06876524 0.1307262 0.112402 0.05656583 0.1574926 
## 
## solution.w:
##  4.71758e-05 3.32575e-05 0.3396472 9.0766e-06 1.94438e-05 1.04275e-05 1.29423e-05 0.02335708 1.18425e-05 8.3038e-06 2.93885e-05 1.79612e-05 1.55228e-05 7.3199e-06 5.0208e-06 9.3837e-06 1.32051e-05 8.70245e-05 8.0744e-06 3.33224e-05 7.847e-06 1.14666e-05 7.3433e-06 4.69693e-05 2.18658e-05 4.62012e-05 5.5106e-06 8.9994e-06 0.6268861 1.49693e-05 7.3636e-06 4.6795e-06 0.0002663817 8.1728e-06 4.47696e-05 0.002544997 1.41598e-05 1.16385e-05 1.06312e-05 7.3917e-06 9.0878e-06 0.006630562 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 332749720 
## 
## solution.v:
##  0.02060073 0.001829576 0.01319674 0.00423167 0.002683945 0.000235386 0.04152996 0.02968503 0.0003466295 0.04662424 0.00165419 0.2665595 0.237025 0.3337974 
## 
## solution.w:
##  7.8e-09 6.1e-09 4.25e-08 6.1e-09 1.75e-08 0.5302115 3.3e-09 1.569e-07 1.78e-08 1.9e-08 4.8e-09 6.4e-09 4.92e-08 1.22e-08 6.8e-09 1.57e-08 1.5e-08 7.4e-09 1.94e-08 2.5e-08 6.3e-09 4.3e-09 4.6e-09 3e-09 2.04e-08 0.24209 8e-09 1.12e-08 1.42e-08 3.81e-08 5.1e-09 5.8e-09 2.08e-08 1.43e-08 2.07e-08 2.19e-08 7.3e-09 1.88e-08 2.56e-07 6.2e-09 9e-09 0.2276975 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 834324.6 
## 
## solution.v:
##  0.0007177397 0.0007547964 0.006753353 0.001441258 0.001479418 0.0004185719 0.009045599 0.007857858 0.02361254 0.01161813 0.00336271 0.2869464 0.248769 0.3972226 
## 
## solution.w:
##  0.0005729707 0.218706 0.1335835 0.0003673969 0.0002403772 9.95669e-05 0.008593313 0.0001991559 0.0001705844 0.0004021106 0.0002110892 0.0001526098 0.0001397052 0.0004592328 0.001121647 0.0001307323 0.0002083994 0.0001117295 0.1118467 0.008214699 5.6871e-05 0.4333072 0.0001282093 0.06283468 0.0001495421 4.97348e-05 0.009312408 0.0003443881 1.00529e-05 0.0002934652 0.0003876192 0.001774597 0.003254087 0.0001999543 0.001236768 0.0001630462 0.0002108283 8.72313e-05 0.0001506867 0.000424051 6.26028e-05 3.05317e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11647801 
## 
## solution.v:
##  0.001319175 0.0003194638 0.004115885 1.5116e-06 3.47243e-05 0.03185837 4.7211e-06 0.0009036915 0.02063957 0.003049126 1.28023e-05 0.2812263 0.2563988 0.4001159 
## 
## solution.w:
##  9.2146e-06 5.8272e-06 7.3768e-06 1.05564e-05 9.8306e-06 0.01759833 1.22015e-05 0.003886122 8.5528e-06 9.859e-06 5.7169e-06 2.03731e-05 0.0005725774 6.1123e-06 0.2335996 0.099198 1.15462e-05 6.4384e-06 6.5442e-06 9.5991e-06 1.87639e-05 1.14259e-05 7.6132e-06 4.2921e-06 9.5612e-06 2.5907e-06 3.0546e-06 2.45648e-05 1.07102e-05 1.2816e-06 8.9666e-06 6.9991e-06 0.1737377 2.13226e-05 7.7104e-06 1.31448e-05 6.171e-07 3.5614e-06 0.4709673 9.3083e-06 8.7482e-06 0.000126408 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1166912 
## 
## solution.v:
##  0.000816406 0.001317098 0.01312614 0.0003653373 0.001015974 0.0002633752 0.009934053 0.007844583 0.0126864 0.01058436 0.009766393 0.2839012 0.2479014 0.4004772 
## 
## solution.w:
##  5.5304e-06 3.3188e-06 3.59419e-05 5.8465e-06 0.04158167 0.4147013 2.8881e-06 0.2495154 7.2572e-06 1.33582e-05 1.9192e-06 6.0691e-06 0.1320268 5.7301e-06 4.0988e-06 0.00221904 1.18302e-05 2.6883e-06 4.3776e-06 5.6003e-06 1.83167e-05 3.4364e-06 6.3861e-06 3.0581e-06 4.6196e-06 2.8409e-06 1.09044e-05 9.4305e-06 0.06517343 6.34056e-05 3.9772e-06 2.3343e-06 8.8704e-06 4.8654e-06 3.689e-07 0.001707175 0.09212552 3.8192e-06 6.97077e-05 4.2598e-06 4.801e-06 0.0006077701 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 103816.4 
## 
## solution.v:
##  0.05669344 0.005913073 0.004267549 1.4265e-06 0.02334697 0.0003458475 0.0368758 0.004254005 0.007534615 0.02881846 0.02439894 0.2693028 0.2015549 0.3366922 
## 
## solution.w:
##  6.4781e-06 4.7033e-06 2.0749e-06 3.7798e-06 3.2649e-06 8.664e-07 0.03404323 2.4971e-06 3.3038e-06 3.3162e-06 2.6743e-06 7.9047e-06 1.38395e-05 2.46151e-05 3.3778e-06 1.81554e-05 7.8468e-06 3.1124e-06 3e-10 3.837e-06 9.1799e-06 0.2012355 0.2248146 1.8e-09 2.3537e-06 5.471e-07 1.762e-07 0.00174555 2.8047e-06 3.0309e-06 2.02916e-05 0.07868927 4.4756e-06 5.48563e-05 3.0787e-06 2.4052e-06 1.0587e-06 5.7856e-06 1.9609e-06 2.2137e-06 0.4592413 6.542e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6806760 
## 
## solution.v:
##  0.002451609 0.007794789 0.004054499 0.0007033709 0.001210577 0.002747785 0.001049064 0.06398002 0.001487528 0.0534586 0.01713277 0.2615187 0.1984818 0.3839288 
## 
## solution.w:
##  0.04976761 3.6741e-05 3.1368e-06 3.4458e-06 4.6405e-06 1.9008e-06 0.001239806 4.733e-06 3.4834e-06 4.8503e-06 0.1566795 2.58249e-05 9.2354e-06 2.38174e-05 2.7168e-06 2.54936e-05 5.8921e-06 9.7387e-06 1.88868e-05 4.0124e-06 2.2474e-05 9.5946e-06 2.36623e-05 -6e-10 0.0474894 0.04746071 2.5794e-06 9.1055e-06 3.1375e-06 7.4866e-06 3.4232e-06 2.2998e-06 7.1332e-06 5.0381e-06 3.3512e-06 2.7204e-06 3.83e-06 5.4169e-06 1.69125e-05 3.7628e-06 0.6970393 3.2274e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 71121920 
## 
## solution.v:
##  0.002061936 0.0002943044 0.001078795 0.003201829 0.0004051208 0.02151115 0.03570721 0.01027307 0.0009894414 0.008660677 0.001594924 0.2811867 0.2435222 0.3895127 
## 
## solution.w:
##  3.89e-08 4.25e-08 6.25e-08 4.57e-08 5.75e-08 0.9818895 1.46e-08 1.381e-07 6.31e-08 5.01e-08 3.75e-08 3.74e-08 5.5e-08 3.52e-08 6.34e-08 4.21e-08 4.98e-08 5.15e-08 1.03e-07 8.63e-08 3.25e-08 2.53e-08 3.11e-08 1.43e-08 1.231e-07 0.01810836 4.61e-08 3.88e-08 5.84e-08 7.82e-08 3.86e-08 7.19e-08 5.33e-08 4.47e-08 7.73e-08 6.51e-08 3.7e-09 3.01e-08 7.91e-08 5.63e-08 3.54e-08 4.72e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
## • `w.weight` -> `w.weight...43`
mspe_test_backdated <- mspe.test(placebos_backdated, discard.extreme = FALSE)

mspe_test_backdated$p.val
## [1] 0.3181818
ratio_10mspecontrol_backdated <- mspe.test(placebos_backdated, discard.extreme = TRUE, mspe.limit = 10)

ratio_10mspecontrol_backdated$p.val
## [1] 0.3414634
ratio_5mspecontrol_backdated <- mspe.test(placebos_backdated, discard.extreme = TRUE, mspe.limit = 5)

ratio_5mspecontrol_backdated$p.val
## [1] 0.3589744
ratio_2mspecontrol_backdated <- mspe.test(placebos_backdated, discard.extreme = TRUE, mspe.limit = 2)

ratio_2mspecontrol_backdated$p.val
## [1] 0.5185185
plot_placebos(placebos_backdated)

Different Outcome Variables

Average Contributions

Prepare Data

data_prep_out_averagecontributions <- dataprep(
  foo = ds_state_slim,
  predictors = c("median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("mean_contributions", 2013, c("median")),
    list("mean_contributions", 2014, c("median")),
    list("mean_contributions", 2015, c("median")),
    list("mean_contributions", 2016, c("median"))),
  dependent = "mean_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (Average Contributions)

synth_out_averagecontributions <- synth(
  data.prep.obj = data_prep_out_averagecontributions
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 43610013986 
## 
## solution.v:
##  0.03707928 0.02492434 0.06306442 0.451949 0.1979205 0.2250625 
## 
## solution.w:
##  5.8e-09 6.9e-09 2.0227e-06 0.1126554 3.05e-08 1.02e-08 2.8e-09 1e-09 8.2e-09 3.7e-09 2.9e-09 4.9e-09 9.3e-09 3.31e-08 5.6e-09 2.22e-08 5.4e-09 5.1e-09 6.8e-09 5.5e-09 2.3e-09 2.4e-09 8.7e-09 1.37e-08 6e-09 7.4e-09 9.9008e-06 6.9e-09 2.7e-09 1.22e-08 1.13e-08 2.59e-08 6.1e-09 3e-09 0.1586918 3e-09 0.1132167 0.6154239 4.8e-09 1.3e-08 1.33e-08 5.3e-09 2.3e-09
data_prep_out_averagecontributions$Y0 %*% synth_out_averagecontributions$solution.w
##      w.weight
## 2013  1967492
## 2014  1724241
## 2015  1883023
## 2016  2049866
## 2017  2059961
## 2018  1997827
## 2019  1407858
## 2020  2223334
## 2021  2860608
## 2022  3426326
## 2023  3388099
synth_AZ_median_contributions_averagecontributions <- as.numeric(data_prep_out_averagecontributions$Y0 %*% synth_out_averagecontributions$solution.w)

Hypothesis Testing (Average Contributions)

placebos_averagecontributions <- generate.placebos(
  dataprep.out = data_prep_out_averagecontributions,
  synth.out = synth_out_averagecontributions,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 245756395 
## 
## solution.v:
##  5.15012e-05 0.01652303 0.4494359 0.2749327 0.1227582 0.1362986 
## 
## solution.w:
##  0.000123584 0.0001994894 0.0001182501 0.0001450164 7.64872e-05 6.66589e-05 0.2905816 4.92783e-05 0.0002639198 0.0003358543 9.3097e-05 9.76213e-05 4.80879e-05 3.51036e-05 0.000100464 7.58453e-05 0.000308393 3.74098e-05 0.04455406 0.000200799 0.0002182202 4.18296e-05 0.0001297932 0.0001033716 4.6045e-06 3.75999e-05 4.83588e-05 0.2098884 0.0003023505 4.88377e-05 3.87994e-05 0.1036381 4.05787e-05 0.0002073998 0.0002511953 0.003724946 0.0001228825 2.98896e-05 0.0001020229 9.11848e-05 5.53966e-05 0.3433632 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2478396090 
## 
## solution.v:
##  0.006806602 0.1426842 0.58082 0.1406074 0.002679721 0.126402 
## 
## solution.w:
##  2.74786e-05 0.006762736 0.006200782 0.006356494 0.00879768 0.01014577 0.111074 0.01194396 0.007952092 0.01055303 0.009520105 0.01364077 0.00617863 0.00627948 0.007943021 0.01170886 0.008417803 0.009218383 0.004283282 0.008336983 0.004871411 0.006969494 0.01063689 0.008239605 0.2154554 0.004623361 0.00961682 0.1984804 0.009397672 0.005887417 0.005490868 0.01073087 0.007058064 0.007984039 4.6693e-06 0.1763025 0.01778126 0.007720762 0.01177933 0.0069567 0.00864537 2.56525e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1167972701 
## 
## solution.v:
##  0.0005460459 0.01047975 0.06519627 0.380124 0.2515037 0.2921503 
## 
## solution.w:
##  2.616e-07 3.661e-07 4.213e-07 0.1308744 2.094e-07 1.075e-07 1.146e-07 4.4777e-06 2.684e-07 1.466e-07 2.129e-07 3.131e-07 9.591e-07 8.13e-08 2.224e-07 1.2293e-06 1.832e-07 7.1e-08 5.544e-07 4.56e-08 5.081e-07 1.577e-07 2.706e-07 1.965e-07 4.625e-07 0.5021181 4.4901e-06 1.7307e-06 3.244e-07 2.68e-07 1.628e-07 1.793e-07 1.597e-07 0.3669845 1.2583e-06 1.92e-07 7.969e-07 9.42e-08 1.1277e-06 1.404e-07 1.191e-07 1.75e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 160003220214 
## 
## solution.v:
##  0.00424182 7.7563e-06 0.07731486 0.2670858 0.2090391 0.4423106 
## 
## solution.w:
##  5.6949e-06 8.7274e-06 1.90714e-05 1.31875e-05 1.1e-05 6.5996e-06 9.1509e-06 1.57871e-05 1.11014e-05 8.0101e-06 6.0959e-06 1.28579e-05 2.21311e-05 1.02809e-05 1.63138e-05 1.07895e-05 5.1511e-06 3.2583e-06 4.8e-09 2.46e-08 3.4376e-06 8.8034e-06 8.5388e-06 3.6031e-06 5.7639e-06 0.5227978 1.10185e-05 6.3497e-06 1.0908e-05 1.61311e-05 8.87056e-05 3.5121e-06 4.3401e-06 2.17425e-05 3.9229e-06 4.91e-08 9.15089e-05 4.3129e-06 1.62802e-05 0.47669 3.5251e-06 4.4264e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 574612677 
## 
## solution.v:
##  0.2497659 0.1703509 0.1855495 0.2040531 0.1902806 1.74e-08 
## 
## solution.w:
##  0.0005542667 0.0006872848 0.6758544 0.0004008485 0.0006004347 0.0003772953 0.0004754654 0.0005689497 0.0004913029 0.0004103586 0.0006485803 0.0005883047 1.1886e-06 0.0003302655 0.000705583 0.000651323 0.0007052802 0.000526775 0.05867513 0.0003046814 0.000588796 0.0004754604 0.0008313044 0.2187402 0.0005704211 0.02398138 0.0006517119 0.0006462841 0.0007388824 0.0004725678 0.0003026771 0.0008154939 0.0004379075 0.00137244 0.001488836 0.0005763363 0.0005557244 0.0005919596 0.0007878811 0.0005969281 0.000774057 0.0004451119 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3301695570 
## 
## solution.v:
##  0.421885 0.06226326 0.05755235 0.2861732 0 0.1721262 
## 
## solution.w:
##  0.01557877 0.01420477 0.008398177 0.007741584 0.00991127 0.01057553 0.022975 0.008995946 0.01014108 0.01142804 0.014466 0.01442046 0.0102126 0.001674568 0.02037978 0.009282436 0.01641851 0.1214011 0.008751747 0.004546972 0.006067216 0.03564961 0.01990603 0.02639557 0.01823659 0.008091197 0.008757866 0.008706697 0.01467456 0.01493026 0.1484417 0.02053752 0.007913921 0.01063061 0.008098037 0.02751984 0.01009787 0.000764981 0.01056712 0.0746818 0.1675846 0.01024204 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5568128304 
## 
## solution.v:
##  0.0002438054 0.08080583 0.07266764 0.49518 0.3500355 0.001067278 
## 
## solution.w:
##  0.003568889 0.001992795 0.0005930548 0.0007003643 0.000862713 0.00187185 0.06020927 0.0007556133 0.001412061 0.4875574 0.00232221 0.001695398 0.0007194088 1.156e-06 0.001663986 0.001081943 0.002643954 2.7635e-06 0.000545056 0.3495018 0.001117055 0.00161759 0.002210356 0.002061928 0.002617875 0.000443529 0.0007965026 0.001382262 0.001720927 0.001204965 0.001246943 0.002602283 0.05104062 0.0008834863 0.001377591 0.00192462 0.0007596047 0.0008524853 0.00103771 0.001535669 0.001793936 7.03952e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1539712004 
## 
## solution.v:
##  0.003067802 0.00366114 0.1190321 0.2255943 0.2623307 0.386314 
## 
## solution.w:
##  9.35446e-05 1.00635e-05 5.526e-06 8.1479e-06 9.1103e-06 1.69748e-05 2.8395e-06 7.425e-06 1.65315e-05 0.6269995 2.50695e-05 5.9e-09 7.7778e-06 9.5017e-06 7.8884e-06 1.09944e-05 3.1552e-05 0.3461561 1.05564e-05 7.344e-07 1.12148e-05 2.04394e-05 9.6051e-06 2.064e-05 8.981e-07 4.8131e-06 8.4848e-06 1.47624e-05 1.36338e-05 1.37312e-05 1.2754e-05 1.99922e-05 8.92e-06 5.1169e-06 1.33717e-05 0.02608958 6.5525e-06 3.2e-09 7.6457e-06 1.2339e-05 9.7061e-06 0.000266029 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 33048803950 
## 
## solution.v:
##  1.1948e-06 0.5822122 0.1036764 9.3844e-06 0.3130367 0.001064107 
## 
## solution.w:
##  0.001296599 0.001778941 0.0531099 0.002328499 0.002607567 0.001346524 0.001034778 0.001076095 0.001321828 0.001115972 0.001268679 0.0016909 0.003217021 0.0008304219 0.001285783 0.002744136 0.001169283 0.0009754707 0.001287558 0.0008489016 0.001328154 0.001052916 0.001504921 0.00126449 0.001853508 0.2663059 0.01107777 0.002322442 0.001683548 0.001206625 0.0007955882 0.001318079 0.001000772 0.002352732 0.00226966 0.001781832 0.6112702 0.0009729637 0.002709269 0.001255432 0.001227191 0.001111133 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 568103294 
## 
## solution.v:
##  0.1909265 0.1956167 0.002351552 0.2756838 0.2968329 0.03858845 
## 
## solution.w:
##  4.306e-06 0.003011579 0.04602446 0.1563813 0.001660985 0.001927119 0.002947658 0.002965334 0.001757287 0.5758262 0.002227833 0.002766353 0.001472337 0.001568566 0.00212352 0.002558351 0.002657124 0.002213562 0.03319531 5.9477e-06 0.05332016 0.001238584 0.002284058 0.001608677 0.002308676 0.001232999 0.001686224 2.48941e-05 0.002942706 0.00132362 0.001124449 0.002527804 0.001624941 0.000798187 0.002923447 0.003300421 0.002697145 0.001377722 0.002567107 0.001809666 0.001367871 0.06661546 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 184284186 
## 
## solution.v:
##  0.005238448 0.1439784 0.02927458 0.4882939 0.2548383 0.07837642 
## 
## solution.w:
##  0.0006858071 0.0002303968 0.0001485472 0.0005786075 0.0001507431 0.0001788832 0.2004967 0.2963843 9.26494e-05 0.006279834 0.0002279456 0.000226149 9.40879e-05 0.000187102 0.00021216 0.0001622813 0.0003719733 0.0006531253 0.0001703833 0.09874227 0.0002859075 0.0001120918 0.0002205031 0.0001438739 0.000233263 6.99741e-05 0.0001010465 4.678e-07 0.0002562993 0.0001129172 0.0001153588 0.0003088877 0.0001898425 0.0002018774 0.0001702759 2.60704e-05 0.07259114 0.0001405365 0.0001520433 0.0001389553 0.0001209475 0.3180338 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 180622708 
## 
## solution.v:
##  0.3602963 0.05341374 0.01075966 0.1931655 0.009064922 0.3732999 
## 
## solution.w:
##  0.0008319905 0.008081515 0.005932478 0.002589507 0.005543633 0.007754144 0.006434667 0.06536923 0.003826431 0.006584704 0.008621349 0.007721467 0.003947681 0.006040033 0.009059741 0.006235533 0.001580759 7.66e-08 0.00176457 0.002498156 0.001982468 0.122334 0.01068971 0.1372364 0.1119923 0.002793073 0.004115307 0.005440042 0.006143565 0.004893634 0.004139498 0.004056702 0.1173437 0.008605176 3.2488e-06 0.004922561 0.00373672 0.07046015 0.006782879 0.003600819 0.004505371 0.2038051 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2455996509 
## 
## solution.v:
##  0.196876 0.4203913 0.1707688 0.002726336 1e-10 0.2092375 
## 
## solution.w:
##  1.294e-06 0.01478663 0.008049663 0.01373341 0.008184896 0.01722061 0.02265185 0.008098662 0.03420448 0.01319744 0.01798402 0.01553585 0.01292082 0.01528438 0.01151641 0.02230025 0.007109611 0.01435297 0.006348815 0.06361675 0.01086086 0.01787056 0.01001943 0.003887356 0.09359309 0.009704655 0.02664437 0.0611511 0.01191262 0.01529894 0.0154557 0.004027378 0.018505 0.008237461 0.005001835 0.2460563 0.02710659 0.01753904 0.01382651 0.01734496 0.02260813 0.01624929 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 52238497683 
## 
## solution.v:
##  0.03207953 0.001973536 0.1891701 0.1002641 0.184729 0.4917837 
## 
## solution.w:
##  0.003475906 0.005196032 0.00759792 0.0003616376 0.007936106 0.006180393 0.001401678 0.003067826 0.001709674 0.002296765 0.00179485 0.003581946 0.005485367 0.001725107 0.006115188 0.0038442 0.003076112 0.002503615 0.003025606 0.000749092 0.0005128996 0.02086411 0.00734299 0.008237217 0.01090369 0.4784486 0.2603895 0.002689629 0.004443642 0.006999031 0.01882695 0.003282735 2.28193e-05 0.00831905 0.002061494 0.03339417 0.0009491293 0.004432757 0.006518493 0.01352986 0.03525855 0.001447698 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1824722766 
## 
## solution.v:
##  0.0001396178 2.375e-07 0.1942051 0.1674279 0.217914 0.4203132 
## 
## solution.w:
##  2.39329e-05 2.15205e-05 1.3962e-05 1.02155e-05 1.73073e-05 2.71163e-05 2.19943e-05 0.4006197 1.30855e-05 2.98665e-05 1.84255e-05 3.97624e-05 2.39183e-05 1.29048e-05 1.07482e-05 2.10241e-05 2.75237e-05 1.15e-08 0.1148782 0.4799542 4.86849e-05 5.19251e-05 2.30612e-05 2.18315e-05 2.13633e-05 8.4027e-06 1.42073e-05 1.97213e-05 1.8173e-05 2.73742e-05 3.15156e-05 1.47639e-05 0.003758942 1.87084e-05 2.18892e-05 1.32138e-05 1.1499e-05 1.45704e-05 1.86063e-05 1.12589e-05 1.2129e-05 3.27292e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1062236778 
## 
## solution.v:
##  0.01953597 0.02602365 0.01038461 0.3503998 0.5794489 0.01420712 
## 
## solution.w:
##  7.17741e-05 3.85823e-05 6.56968e-05 4.61488e-05 0.0001586397 5.80333e-05 8.2466e-06 0.2111158 2.42172e-05 2.90817e-05 1.44395e-05 2.33279e-05 3.74051e-05 6.20177e-05 3.814e-07 2.39123e-05 5.87823e-05 0.004112905 0.0002630335 9.9453e-06 1.72892e-05 0.00256526 0.2391903 0.1348821 3.9e-09 0.0002172588 2.21836e-05 2.04553e-05 0.0001111121 5.25258e-05 0.2436132 8.41963e-05 1.07063e-05 0.1627103 2.14348e-05 3.591e-07 4.31627e-05 8.2817e-06 4.06557e-05 0.0001278051 2.65864e-05 1.24351e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2798125075 
## 
## solution.v:
##  0.006117737 0.000532678 0.1977759 0.1358898 0.2450022 0.4146817 
## 
## solution.w:
##  0.001485538 0.002165305 0.002970476 0.0009083162 0.002003775 0.002256373 0.002670415 0.03484434 1.38062e-05 0.00203196 0.004541747 0.002844474 0.006720446 0.001656691 0.001785145 0.002202639 0.001339738 0.001022787 0.0008107462 0.001057443 0.0009913584 0.01918935 0.001793617 0.0008129243 2.08517e-05 0.01135367 0.5459076 0.002006915 0.001384756 0.001637674 0.003132267 0.0007728384 3.08683e-05 0.1124392 0.001108073 0.001019276 0.001550649 0.001340017 0.00570278 0.0005531025 0.0006379663 0.2112821 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3910944676 
## 
## solution.v:
##  0.02156582 2.35414e-05 0.2052079 0.1602562 0.1994458 0.4135007 
## 
## solution.w:
##  0.0002160591 2.53334e-05 1.34881e-05 1.17054e-05 1.89063e-05 2.63447e-05 5.4587e-05 0.2943657 1.05466e-05 3.62978e-05 6.10148e-05 5.21364e-05 2.20931e-05 1.15715e-05 3.57307e-05 3.54512e-05 1.63893e-05 0.09957679 0.07296502 2.14e-07 7.95367e-05 2.61462e-05 3.64284e-05 0.4260059 2.74526e-05 8.2353e-06 1.12012e-05 2.02756e-05 2.63643e-05 1.78303e-05 1.51434e-05 3.73617e-05 5.92695e-05 1.92324e-05 2.97612e-05 1.76902e-05 1.15723e-05 1.44e-07 1.69757e-05 2.32021e-05 2.29676e-05 0.105932 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 529348009 
## 
## solution.v:
##  0.0055998 0.003991339 0.1549917 0.2161332 0.191668 0.427616 
## 
## solution.w:
##  8.95e-08 8.5e-08 2.8e-08 4.12e-08 4.01e-08 1.091e-07 1.56e-08 0.3555435 3.63e-08 7.47e-08 4.53e-08 8.53e-08 8.45e-08 3.54e-08 5.61e-08 1.111e-07 4.9e-08 1.032e-07 5.12e-08 0.5113458 4.8e-08 1.061e-07 1.207e-07 1.4e-09 8.56e-08 2.11e-08 3.59e-08 5.07e-08 9.24e-08 7.28e-08 9.06e-08 0.1016098 3.9e-08 4.38e-08 4.51e-08 0.031055 4.57e-08 1e-10 5.11e-08 1.5121e-06 0.0004423533 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54304985450 
## 
## solution.v:
##  0.04394194 0.1620408 0.06300058 0.2896242 0.04704944 0.394343 
## 
## solution.w:
##  3.24e-08 4.1e-08 3.53e-08 1.9797e-06 0.630676 5.45e-08 4.68e-08 3.72e-08 2.5e-08 8.54e-08 4.67e-08 4.29e-08 4.43e-08 8.27e-08 0.07759894 0 3.1e-08 1.97e-08 2.8e-09 6.05e-08 0.2413555 4.17e-08 4.71e-08 5e-10 3.02e-08 0.05033314 2.6e-08 1.9e-08 7.36e-08 8.21e-08 6.97e-08 4.1e-08 4.32e-08 7.53e-08 0 4.1e-08 3.6e-08 2.83e-08 4.17e-08 3.29649e-05 3.92e-08 2.95e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29286818434 
## 
## solution.v:
##  0.007335266 5.78763e-05 0.1993444 0.1679293 0.213292 0.4120413 
## 
## solution.w:
##  3.3e-09 2.7e-09 8e-10 1.2e-09 1.2e-09 3.6e-09 1.092e-07 4.8e-09 1.2e-09 3.6e-09 9.3e-09 5.3e-09 2.8e-09 1e-09 7.348e-07 2.9e-09 1.9e-09 4.7e-09 0.9418657 1.9e-09 4.6e-09 6.4e-09 2.8e-09 4.3e-09 2.6e-09 6e-10 1.2e-09 2.2e-09 2.3e-09 2.8e-09 4e-09 3.3e-09 1.077e-07 1.3e-09 2.1e-09 2.3e-09 1.2e-09 0.05813321 1.6e-09 3e-09 7.5e-09 2.52e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5142384194 
## 
## solution.v:
##  0.07640599 0.1156415 0.343188 0.2640342 0.1358577 0.0648725 
## 
## solution.w:
##  3.85e-08 1.168e-07 5.929e-07 0.004845282 2.642e-07 1.234e-07 1.291e-07 4.76e-08 6.629e-07 1.6716e-06 8.9e-09 7.3e-08 1.572e-07 3.568e-07 3.001e-07 1.058e-07 7.135e-07 3.93e-08 6.08e-08 0.1368138 0.0589379 9.71e-08 7.54e-08 3.97e-08 5.66e-08 6.125e-07 6.5e-07 2.3408e-06 1.453e-07 2.517e-07 2.513e-07 5.54e-08 0.3829583 2.226e-07 0.4164331 1.039e-07 7.265e-07 5.23e-08 3.184e-07 1.638e-07 6.41e-08 4e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 341189969 
## 
## solution.v:
##  0.05222826 0.001787549 0.1605111 0.2038834 0.251784 0.3298057 
## 
## solution.w:
##  5.8556e-06 9.662e-06 1.75789e-05 3.63e-07 5.3847e-06 1.35215e-05 5.9e-09 0.003701774 6.2387e-06 2.8578e-06 1.37723e-05 0.0001402725 0.0004658139 2.3946e-06 9.323e-07 1.38799e-05 0.0001719741 3.7577e-06 9.347e-07 7.01e-07 3.1e-09 4.461e-07 1.42104e-05 1.4618e-06 0.001572983 1.3099e-06 0.1102744 2.3573e-06 2.2264e-06 1.3526e-06 0.2842285 6.719e-07 0.01260885 4.4087e-05 1.3841e-06 5.715e-07 1.2038e-06 0.5865801 3.33402e-05 1.5e-07 1.4e-09 5.27295e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6588368147 
## 
## solution.v:
##  0.07078238 0.07345035 0.2667353 0.3872053 0.128998 0.07282863 
## 
## solution.w:
##  0.003349142 0.00216589 0.002389262 0.001289364 0.002900616 0.002320765 0.001111644 0.05451876 0.001315975 0.001404355 0.001172254 0.001712205 0.002152235 0.001704208 0.001585957 0.3517852 0.001338645 0.001780927 0.006564861 0.002025152 0.001076341 0.0007257355 0.0008163637 0.08135852 0.3664793 0.00149581 0.001243561 0.001027447 0.003410696 0.00151371 0.001021645 0.001888975 0.0009393462 0.003537519 0.0009745601 0.07619895 0.001832413 0.001829287 0.002015034 0.003236096 0.002198429 0.0005928953 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 906924046 
## 
## solution.v:
##  0.007477208 0.002820278 0.1919801 0.1658148 0.2158293 0.4160782 
## 
## solution.w:
##  0.2675208 7.75e-08 2.48e-08 2.17e-08 3.32e-08 5.33e-08 4.92e-08 6.43e-08 2.88e-08 5.4e-08 6.65e-08 1.357e-07 5.42e-08 2.44e-08 2.96e-08 4.84e-08 4.33e-08 0.3108291 2.87e-08 5.28e-08 8.33e-08 1.0208e-06 5.12e-08 8.82e-08 2.421e-07 1.58e-08 3.04e-08 7.62e-08 5.43e-08 3.37e-08 2.55e-08 1.866e-07 1.718e-07 3.4e-08 0.06757828 5.69e-08 2.89e-08 0.04612794 3.95e-08 4.04e-08 0.2895398 0.01840099 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8237466565 
## 
## solution.v:
##  0.4436376 0.1523989 0.07267527 0.2253865 0.1047372 0.00116443 
## 
## solution.w:
##  0.8426733 4.3512e-06 0.1120524 9.693e-07 2.64671e-05 2.6418e-06 1.5892e-06 3.0068e-06 2.7512e-06 2.0161e-06 1.9674e-06 2.9935e-06 3.1623e-06 2.9486e-06 9.205e-07 3.4396e-06 2.8509e-06 3.4813e-06 2.7838e-06 3.5013e-06 1.0608e-06 1.3383e-06 1.8828e-06 6.0956e-06 0.0451235 2.4637e-06 2.7236e-06 3.052e-06 4.26e-06 1.3659e-06 5.678e-07 1.3484e-06 1.2369e-06 2.60911e-05 3.0533e-06 4.6744e-06 3.1401e-06 2.4233e-06 4.5205e-06 2.1609e-06 3.3413e-06 2.0896e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 174715061535 
## 
## solution.v:
##  0.006074586 0.001533788 0.1925279 0.1662936 0.2163625 0.4172075 
## 
## solution.w:
##  6e-10 1.2e-09 0.9999999 8.6e-09 5.5e-09 1e-09 2e-10 3e-10 8.2e-09 1e-09 4e-10 6e-10 1.2e-09 1.96e-08 3e-10 1.1e-09 2.8e-09 5e-10 2e-10 2.9e-09 0 1.3e-09 7e-10 1e-09 5e-10 1e-09 7.4e-09 2e-09 1.5e-09 1.9e-09 1.4e-09 6e-10 3e-10 4.2e-09 2.3e-09 9e-10 5.6e-09 2e-10 3.1e-09 9e-10 4e-10 2e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13994498879 
## 
## solution.v:
##  0.1392136 0.1039731 1.9875e-06 0.2448528 0.002665208 0.5092933 
## 
## solution.w:
##  0.0008458705 0.00116948 7.17e-08 0.0005569239 0.001244944 0.001522271 0.001002138 0.0007615591 0.2359807 0.001005507 0.0009055577 0.001759604 0.001352589 0.00569889 0.00136892 0.001228928 0.005462259 0.001001318 0.000778256 0.001342407 0.0007436975 0.09406426 0.005447063 0.001137086 0.00140808 0.001190329 0.3233169 0.001630603 0.0009573607 0.004185104 0.002994957 0.0008379508 0.09832697 0.001245945 0.1880481 0.0007283189 0.0009004434 0.002638384 0.00160576 0.0008770449 0.001572007 0.001155394 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1086874314 
## 
## solution.v:
##  0.2272309 0.02312413 0.2580905 0.2427436 0.0005162178 0.2482946 
## 
## solution.w:
##  9.4e-08 8.651e-07 3e-10 9.43e-08 9.1e-08 3.503e-07 4.474e-07 2.53e-07 8.09875e-05 2.055e-07 3.557e-07 4.581e-07 6.698e-07 2.312e-07 1.956e-07 1.814e-07 2.4273e-06 2.423e-07 2.8e-07 6.4e-08 2.71e-07 2e-09 3.122e-07 2.529e-07 2.048e-07 1.01578e-05 1.414e-07 5.5865e-06 2.403e-07 2.397e-07 2.041e-07 2.902e-07 3.985e-07 9.35e-08 0.4846464 0.0630415 0.269399 3.596e-07 3.844e-07 2.806e-07 6.847e-07 0.1828045 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1100779313 
## 
## solution.v:
##  0.05541658 0.0003791081 0.09803356 0.07118494 0.1241688 0.650817 
## 
## solution.w:
##  2.29948e-05 0.005460548 0.01692759 0.01736215 0.004057569 0.00430082 0.005038722 0.1009997 0.00272146 0.00673218 0.006598322 0.004163333 0.005200486 0.002659644 0.00381255 0.005558559 0.00346908 0.00650178 0.006806047 0.142031 0.005042083 0.003278776 0.003074986 0.006118286 0.003222064 3.1235e-06 0.002181655 0.002465249 0.003620657 0.003017602 0.0029159 0.001669617 0.002988142 0.1423843 0.002502085 0.4376312 0.006671056 0.003411455 0.004928854 0.004306007 0.003236524 0.004905937 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 149977694 
## 
## solution.v:
##  0.2344156 0.0001128103 0.49889 0.1221778 0.09879246 0.04561128 
## 
## solution.w:
##  0.003166386 0.004147503 0.002928559 0.07163573 0.003193906 0.004298552 0.003710346 0.002866058 0.00591782 0.003225557 0.003360752 0.00425198 0.00402419 0.006614502 3.2666e-06 0.003131187 0.005312847 0.003497898 0.003653549 0.001510916 0.002725859 0.1759572 0.005432048 0.003597677 0.0043269 0.003677493 0.005413182 0.1420648 0.005827902 0.003667421 0.4470103 0.004151748 0.005675507 0.002848621 0.006502723 0.004330052 0.004892112 0.005505758 0.003924641 0.00544827 0.01256016 0.004008111 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 390209799 
## 
## solution.v:
##  0.000195203 0.0003814766 0.1095141 0.525545 0.3045074 0.05985677 
## 
## solution.w:
##  7.0517e-06 1.26178e-05 2.50037e-05 4.41e-08 1.16095e-05 2.49461e-05 5.3707e-06 0.234238 1.00255e-05 1.1062e-05 8.076e-06 9.1472e-06 3.84591e-05 1.71779e-05 0.286445 0.0003198898 1.21154e-05 6.3658e-06 3.6e-09 6.1147e-06 1.1814e-06 5.0906e-06 0.09201457 1.33697e-05 5.7192e-06 9.6301e-06 5.79358e-05 5.5839e-06 8.192e-06 1.30955e-05 2.74486e-05 5.3963e-06 6.72e-06 0.1030083 5.9518e-06 6.52e-08 0.2835706 6.0817e-06 1.05383e-05 6.0349e-06 5.3429e-06 5.1038e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6366412581 
## 
## solution.v:
##  0.001929028 0.0001932011 0.2799084 0.2396727 0.01154853 0.4667482 
## 
## solution.w:
##  0.2075521 0.0007680609 0.0004122842 0.0005961355 0.0005879287 0.0005553168 0.0003449966 2.371e-07 0.0003448254 0.0007670006 0.0005110693 0.0005240953 0.0005236557 0.0003914477 0.0003976854 0.0007353046 0.0004328433 0.002290752 0.1642928 0.001225685 6.43435e-05 0.0007710863 0.0003167415 0.0009695103 0.3533604 2.9e-09 0.0002982876 0.000339307 0.0006527487 0.001253833 0.000431612 0.0003223301 0.0003304576 0.000531128 0.0007646908 0.2482523 0.0005766832 0.0001010687 0.0005172503 0.004018203 0.00252541 0.0003483889 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10755108289 
## 
## solution.v:
##  0.000582853 0.1232483 0.03529981 0.4526347 0.3561864 0.03204795 
## 
## solution.w:
##  1.9954e-06 2.2191e-06 2.9911e-06 1.4254e-06 3.2635e-06 3.3512e-06 2.7603e-06 2.1504e-06 2.3902e-06 3.2922e-06 2.7264e-06 5.1442e-06 2.687e-06 2.5237e-06 0.1318326 3.5379e-06 3.4821e-06 2.3619e-06 9.467e-07 6.554e-06 1.28e-08 0.282791 0.02979231 2.4051e-06 2.1508e-06 2.166e-06 1.7529e-06 2.9791e-06 2.5844e-06 1.8988e-06 6.411e-07 4.93043e-05 1.1214e-06 3.2737e-06 4.7436e-06 1.0438e-06 1.474e-06 0.5554437 2.708e-06 4.329e-07 6.613e-07 3.2194e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1691567925 
## 
## solution.v:
##  0.008586006 0.009343097 0.1909537 0.004185773 0.3352509 0.4516806 
## 
## solution.w:
##  6.8e-08 7.63888e-05 0.7092019 0.0001074982 0.001013248 0.0003226959 8.34889e-05 0.2756543 0.0001350769 0.0001079222 5.60055e-05 0.0002626883 0.0001607602 0.0003300767 0.0004427637 0.001779582 0.000128563 7.20554e-05 0.0001649249 0.003605815 7.43308e-05 5.649e-05 0.001015523 0.0002219861 0.0002564085 1.4853e-06 0.001916669 0.0001634173 2.6644e-05 0.0001109589 0.0004122586 0.0005259208 4.84888e-05 0.0003417615 1.56066e-05 6.01438e-05 8.40416e-05 0.0005829426 0.0001487881 0.0001025671 0.0001277798 3.57e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2461059766 
## 
## solution.v:
##  8.5227e-06 0.003022448 0.1453983 0.1331413 0.1274437 0.5909858 
## 
## solution.w:
##  1.705e-07 1.859e-07 9.6624e-06 4.492e-07 1.9099e-06 1.14e-07 7.73e-08 1.143e-07 1.4449e-06 1.988e-07 1.07e-07 6.12e-08 1.624e-07 9.321e-07 8.31e-08 1.69e-07 5.087e-07 1.106e-07 9.49e-08 5.591e-07 7.96e-08 0.4388371 3.95e-08 1.587e-07 4.91e-08 1.131e-07 1.7039e-05 0.3281873 0.2329377 2.559e-07 1.255e-07 1.003e-07 1.38e-07 0 1.0382e-06 1.686e-07 6.309e-07 2.03e-08 6.423e-07 1.567e-07 3.14e-08 3.4e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6296384297 
## 
## solution.v:
##  0.0266771 0.1401532 0.296513 0.2218568 0.1545877 0.1602121 
## 
## solution.w:
##  0 1.047e-07 1.32e-08 2.43e-08 1.41e-08 5.6e-08 2.36e-08 0.07633789 5.62e-08 1.71e-08 1.54e-08 2.67e-08 1.061e-07 2.09e-08 2.61e-08 2.82e-08 2.9e-08 1.41e-08 0.1576173 7.7e-09 2.88e-08 8.6e-09 4.12e-08 5.78e-08 2.38e-08 2.43369e-05 1.29e-08 3.41e-08 2.76e-08 4.61e-08 2.58e-08 4.02e-08 0.5321079 1.43e-08 1.65e-08 1.22e-08 0.2338954 3.37e-08 3.06e-08 1.61e-08 1.61665e-05 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 14639311572 
## 
## solution.v:
##  0.1557453 1.979e-07 0.001757965 0.3156282 0.1582441 0.3686242 
## 
## solution.w:
##  3.81438e-05 0.0001759546 0.01526223 0.05467118 0.0001481014 0.0002730375 0.0001628373 3.761e-07 4.5955e-06 0.0001931762 0.0001837809 0.0001470394 0.0004254978 0.0007716796 0.0002489661 0.0002627713 0.0003951032 7.3806e-05 7.78517e-05 3.89198e-05 0.0001336208 7.65776e-05 0.0002589107 9.40484e-05 5.89196e-05 6.12207e-05 0.4196438 0.0006189683 0.0001676204 7.2992e-05 0.000317401 0.02258643 3.03706e-05 0.0001143183 0.0009129134 9.6748e-05 0.4801077 0.000114838 0.0007109632 6.32912e-05 8.97079e-05 0.000113671 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1742046856 
## 
## solution.v:
##  0.0008041623 0.0006781058 0.1781366 0.1617198 0.2532575 0.4054039 
## 
## solution.w:
##  3.43325e-05 3.68941e-05 9.6023e-06 1.21016e-05 1.30311e-05 4.1473e-05 3.69648e-05 3.3252e-05 1.73512e-05 2.60514e-05 3.67681e-05 5.99118e-05 3.66989e-05 1.29601e-05 2.58978e-05 2.78404e-05 2.40732e-05 3.68852e-05 7.2e-08 1.17308e-05 0.2783078 2.00511e-05 0.0001025068 3.67477e-05 6.34989e-05 5.07443e-05 7.1075e-06 1.79092e-05 2.85372e-05 2.58119e-05 2.87067e-05 3.6253e-05 4.07918e-05 0.168713 1.43478e-05 2.34898e-05 4.38055e-05 1.64048e-05 1.98685e-05 2.89327e-05 0.003265836 0.548574 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 62890667 
## 
## solution.v:
##  0.2545903 0.124524 0.1622042 0.1143787 0.03854252 0.3057603 
## 
## solution.w:
##  0.00579685 0.007176813 0.2618933 0.001841857 0.00409691 0.00347232 0.003594287 0.1564387 0.1838667 0.003831494 0.00466435 0.003928102 0.006079821 0.002339381 0.002069557 0.003587088 0.008746847 0.003828625 0.003030112 0.001660768 0.002424657 0.001801954 0.002576147 0.004930693 0.002615955 0.04126826 0.003199959 0.00483211 0.1047942 0.004546057 0.002121652 0.001978832 0.003029443 0.002435096 1.57838e-05 0.00162863 0.007639602 0.1238272 0.002533461 0.00188967 0.002326469 0.005640242 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7731105047 
## 
## solution.v:
##  0.1276791 0.02195111 0.3045571 0.4633481 0.08215364 0.000310952 
## 
## solution.w:
##  9.12e-08 1.291e-07 5.79e-08 0.08866229 6.76e-08 1.426e-07 1.458e-07 8.47e-08 1.458e-07 1.049e-07 1.133e-07 1.05e-07 1.303e-07 1.097e-07 1.049e-07 9.32e-08 1.077e-07 9.72e-08 3e-10 6.08e-08 0.06604034 8.59e-08 1.233e-07 1.066e-07 1.106e-07 1.029e-07 8.3e-08 1.263e-07 1.164e-07 1.28e-07 1.976e-07 0.2096481 1.725e-07 9.39e-08 6.52e-08 8.35e-08 0.1583426 2.229e-07 1.104e-07 9.58e-08 0.4773027 1.013e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5193908013 
## 
## solution.v:
##  0.007324849 0.557082 0.03293689 0.1381452 0.1742422 0.09026879 
## 
## solution.w:
##  3.3773e-06 8.347e-07 1.87e-08 4.03e-08 2.3e-08 1.816e-07 3.5818e-06 4.1213e-06 1.96e-08 4.389e-07 2.5083e-06 8.618e-07 4.124e-07 1.03e-08 1.66e-07 1.27e-07 7.65e-08 3.5471e-06 0.04205494 2.91e-08 9.21975e-05 1.74e-07 2.6e-09 6.526e-07 0.1809647 2.5822e-06 6.1e-09 1.69e-08 3.679e-07 4.073e-07 1.04e-08 2.86e-08 1.3456e-06 2.19e-07 3.86e-08 9.95e-08 0.0002358535 8.87e-08 0.5769559 7.45e-08 0.199663 6.9927e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3022697413 
## 
## solution.v:
##  0.001518076 4.59292e-05 0.3293188 0.1988769 0.00498894 0.4652513 
## 
## solution.w:
##  0.0006179854 0.0002985077 0.0001145461 0.0001189307 0.000152555 0.0002794791 0.0001185121 0.0004998625 0.0001131768 0.0003112414 0.0003606651 0.0004060505 0.0002734149 0.000112838 9.47544e-05 0.0003023057 0.0001882547 0.0005430625 3.89e-07 0.0001828281 0.001096259 0.000213131 0.0002405053 0.0003663278 0.1712781 1.9724e-06 6.96448e-05 0.0001161388 0.0001986255 0.0002701961 0.0001962714 0.0001830438 0.0004370639 9.95e-08 0.0001755101 2.86899e-05 8.092e-07 0.0001301739 0.7907502 0.0001910779 0.0001915988 0.02877524
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
## • `w.weight` -> `w.weight...43`
mspe_test_averagecontributions <- mspe.test(placebos_averagecontributions, discard.extreme = FALSE)

mspe_test_averagecontributions$p.val
## [1] 0.8863636
plot_placebos(placebos_averagecontributions)

Placebo Gaps, MSPE Plot, & P-Value with All Control States
df_synthAZ_plot_averagecontributions <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions, synth_AZ_median_contributions_averagecontributions),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol_averagecontributions <- mspe.test(placebos_averagecontributions, discard.extreme = FALSE)

ratio_allcontrol_averagecontributions$p.val
## [1] 0.8863636
pre_mspe_controlstates_averagecontributions <- placebos_averagecontributions$mspe.placs

pre_mspe_controlstates_averagecontributions$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27","28","29","30",
                                 "31","32","33","34","35","36","37","38","39","40",
                                 "41","42","43","44")

pre_mspe_controlstates_averagecontributions <- pre_mspe_controlstates_averagecontributions %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe_averagecontributions <- data.frame(pre_mspe = as.numeric(placebos_averagecontributions$loss.v), unit = "Y1")

pre_mspe_data_averagecontributions <- bind_rows(pre_mspe_controlstates_averagecontributions, AZ_pre_mspe_averagecontributions)

mspe_allcontrol_data_averagecontributions <- ratio_allcontrol_averagecontributions$test

mspe_allcontrol_data_averagecontributions <- mspe_allcontrol_data_averagecontributions %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

placebo_gaps_data_averagecontributions <- placebos_averagecontributions$df

## 1. synthetic values in long form
synthetic_long_averagecontributions <- placebo_gaps_data_averagecontributions %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

## 2. actual (observed) values in long form
actual_long_averagecontributions <- placebo_gaps_data_averagecontributions %>% 
  select(year, all_of(unique(synthetic_long_averagecontributions$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

## join & compute gap (synthetic – actual)
placebo_gaps_data_long_averagecontributions <- left_join(actual_long_averagecontributions, synthetic_long_averagecontributions,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       # ← sign fixed here
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long_averagecontributions <- inner_join(placebo_gaps_data_long_averagecontributions, pre_mspe_data_averagecontributions, by = "unit")

placebo_plot_allcontrol_averagecontributions <- ggplot(placebo_gaps_data_long_averagecontributions,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -1000000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -1000000,
           yend = -1000000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = "M")) +
  coord_cartesian(ylim = c(-1500000, 1500000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_averagecontributions$year), max(placebo_gaps_data_long_averagecontributions$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.886. Only lagged median contributions for the\n2013 - 2016 period, median net assets, and median liabilities were used as predictor variables\nin this model due to issues of multicollinearity in the predictors when running placebo tests.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol_averagecontributions

ggsave(
  filename = "Outcome_AverageContributions_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol_averagecontributions,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 10 times AZ in Pre-Treatment Period
ratio_10mspecontrol_averagecontributions <- mspe.test(placebos_averagecontributions, discard.extreme = TRUE, mspe.limit = 10)
## Warning in mspe.test(placebos_averagecontributions, discard.extreme = TRUE, :
## No placebos have a pre-MSPE above mspe.limit. No units were dropped
ratio_10mspecontrol_averagecontributions$p.val
## [1] 0.8863636
placebo_gaps_data_long_averagecontributions %>%
  summarize(n_mspe10_averagecontributions = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10_averagecontributions
##                           <dbl>
## 1                            43
placebo_plot_mspe10_averagecontributions <- ggplot(data = filter(placebo_gaps_data_long_averagecontributions, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -1000000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -1000000,
           yend = -1000000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = "M")) +
  coord_cartesian(ylim = c(-1500000, 1500000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_averagecontributions$year), max(placebo_gaps_data_long_averagecontributions$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than Arizona's. Associated\np-value is approximately 0.886. Only lagged median contributions for the 2013 - 2016 period,\nmedian net assets, and median liabilities were used as predictor variables in this model\ndue to issues of multicollinearity in the predictors when running placebo tests.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10_averagecontributions

ggsave(
  filename = "Outcome_AverageContributions_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10_averagecontributions,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 5 times AZ in Pre-Treatment Period
ratio_5mspecontrol_averagecontributions <- mspe.test(placebos_averagecontributions, discard.extreme = TRUE, mspe.limit = 5)
## Warning in mspe.test(placebos_averagecontributions, discard.extreme = TRUE, :
## No placebos have a pre-MSPE above mspe.limit. No units were dropped
ratio_5mspecontrol_averagecontributions$p.val
## [1] 0.8863636
placebo_gaps_data_long_averagecontributions %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      43
placebo_plot_mspe5_averagecontributions <- ggplot(data = filter(placebo_gaps_data_long_averagecontributions, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -1000000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -1000000,
           yend = -1000000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = "M")) +
  coord_cartesian(ylim = c(-1500000, 1500000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_averagecontributions$year), max(placebo_gaps_data_long_averagecontributions$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than Arizona's. Associated\np-value is approximately 0.886. Only lagged median contributions for the 2013 - 2016 period,\nmedian net assets, and median liabilities were used as predictor variables in this model\ndue to issues of multicollinearity in the predictors when running placebo tests.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5_averagecontributions

ggsave(
  filename = "Outcome_AverageContributions_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5_averagecontributions,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
Placebo Gaps & P-Value with Control States with MSPE < 2 times AZ in Pre-Treatment Period
ratio_2mspecontrol_averagecontributions <- mspe.test(placebos_averagecontributions, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol_averagecontributions$p.val
## [1] 0.9285714
placebo_gaps_data_long_averagecontributions %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      41
placebo_plot_mspe2_averagecontributions <- ggplot(data = filter(placebo_gaps_data_long_averagecontributions, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -1000000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -1000000,
           yend = -1000000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = "M")) +
  coord_cartesian(ylim = c(-1500000, 1500000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_averagecontributions$year), max(placebo_gaps_data_long_averagecontributions$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than Arizona's. Associated\np-value is approximately 0.929. Only lagged median contributions for the 2013 - 2016 period,\nmedian net assets, and median liabilities were used as predictor variables in this model\ndue to issues of multicollinearity in the predictors when running placebo tests.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2_averagecontributions

ggsave(
  filename = "Outcome_AverageContributions_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2_averagecontributions,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Total Contributions

Prepare Data (Total Contributions)

data_prep_out_totalcontributions <- dataprep(
  foo = ds_state_slim,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "total_revenues"),
  special.predictors = list(
    list("total_contributions", 2013, c("median")),
    list("total_contributions", 2014, c("median")),
    list("total_contributions", 2015, c("median")),
    list("total_contributions", 2016, c("median"))),
  dependent = "total_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim$state_id[ds_state_slim$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (Total Contributions)

synth_out_totalcontributions <- synth(
  data.prep.obj = data_prep_out_totalcontributions
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1.806709e+17 
## 
## solution.v:
##  0.05721166 0.0006727583 0.0180018 0.0003418487 0.08520765 0.2375846 0.07481836 2.46604e-05 0.09626184 0.04638995 0.1876763 0.04153058 0.154278 
## 
## solution.w:
##  2.03e-08 1.28e-08 2.9524e-06 3.48e-08 3.224e-07 1.753e-07 2.05e-08 9.29e-08 1.136e-07 1.6e-08 8.7e-08 1.93e-08 2.4e-08 6.93e-08 0.3022122 1.17e-08 2.95e-08 0.2589977 3.83e-08 4.98e-08 2.21e-08 3.18e-08 1.15e-08 0.2480588 3e-08 3.11e-08 0.01422651 1.04e-08 5.18e-08 3.37e-08 3.02e-08 2.46e-08 3.371e-07 2.85e-08 2.365e-07 2.7451e-06 2.7e-09 0.176497 2.37e-08 2.62e-08 8.5e-09 2.9e-09 8.4e-09
data_prep_out_totalcontributions$Y0 %*% synth_out_totalcontributions$solution.w
##        w.weight
## 2013 3741005401
## 2014 3620820676
## 2015 4043154720
## 2016 4369377798
## 2017 4473913127
## 2018 4467954984
## 2019 2106390086
## 2020 4500169800
## 2021 5860096995
## 2022 6672859121
## 2023 6950550077

Hypothesis Testing (Total Contributions)

placebos_totalcontributions <- generate.placebos( dataprep.out = data_prep_out_totalcontributions, synth.out = synth_out_totalcontributions, Sigf.ipop = 5)

mspe_test_totalcontributions <- mspe.test(placebos_totalcontributions, discard.extreme = FALSE)

mspe_test_totalcontributions$p.val

plot_placebos(placebos_totalcontributions)

Placebo Gaps, MSPE Plot, & P-Value with All Control States

df_synthAZ_plot_totalcontributions <- data.frame( year = rep(years, 2), value = c(real_AZ_median_contributions, synth_AZ_median_contributions_totalcontributions), group = rep(c(“Arizona”, “Synthetic Arizona”), each = length(years)))

ratio_allcontrol_totalcontributions <- mspe.test(placebos_totalcontributions, discard.extreme = FALSE)

ratio_allcontrol_totalcontributions$p.val

pre_mspe_controlstates_totalcontributions <- placebos_totalcontributions$mspe.placs

pre_mspe_controlstates_totalcontributions$unit <- c(“1”,“2”,“4”,“5”,“6”,“7”,“8”,“9”,“10”, “11”,“12”,“13”,“14”,“15”,“16”,“17”,“18”,“19”,“20”, “21”,“22”,“23”,“24”,“25”,“26”,“27”,“28”,“29”,“30”, “31”,“32”,“33”,“34”,“35”,“36”,“37”,“38”,“39”,“40”, “41”,“42”,“43”,“44”)

pre_mspe_controlstates_totalcontributions <- pre_mspe_controlstates_totalcontributions %>% rename(pre_mspe = unlist(mspe.placs))

AZ_pre_mspe_totalcontributions <- data.frame(pre_mspe = as.numeric(placebos_totalcontributions$loss.v), unit = “Y1”)

pre_mspe_data_totalcontributions <- bind_rows(pre_mspe_controlstates_totalcontributions, AZ_pre_mspe_totalcontributions)

mspe_allcontrol_data_totalcontributions <- ratio_allcontrol_totalcontributions$test

mspe_allcontrol_data_totalcontributions <- mspe_allcontrol_data_totalcontributions %>% mutate(type = ifelse(unit == “AZ”, “AZ”, “control units”))

placebo_gaps_data_totalcontributions <- placebos_totalcontributions$df

  1. synthetic values in long form synthetic_long_totalcontributions <- placebo_gaps_data_totalcontributions %>% select(year, starts_with(“synthetic.”)) %>% pivot_longer( cols = -year, names_to = “unit”, values_to = “synthetic” ) %>% mutate(unit = str_remove(unit, “synthetic\.”))

  2. actual (observed) values in long form actual_long_totalcontributions <- placebo_gaps_data_totalcontributions %>% select(year, all_of(unique(synthetic_long_totalcontributions$unit))) %>% pivot_longer( cols = -year, names_to = “unit”, values_to = “actual” )

join & compute gap (synthetic – actual) placebo_gaps_data_long_totalcontributions <- left_join(actual_long_totalcontributions, synthetic_long_totalcontributions, by = c(“year”, “unit”)) %>% mutate( gap = actual - synthetic, type = ifelse(unit == “Y1”, “Treated”, “Placebo”))

placebo_gaps_data_long_totalcontributions <- inner_join(placebo_gaps_data_long_totalcontributions, pre_mspe_data_totalcontributions, by = “unit”)

placebo_plot_allcontrol_totalcontributions <- ggplot(placebo_gaps_data_long_totalcontributions, aes(year, gap, group = unit, colour = type, linewidth = type, alpha = type)) + geom_line() + scale_colour_manual(values = c(Treated = “black”, Placebo = “grey70”)) + scale_linewidth_manual(values = c(Treated = 0.9, Placebo = 0.5)) + scale_alpha_manual(values = c(Treated = 1, Placebo = 0.60)) + geom_hline(yintercept = 0, linetype = “dashed”) + geom_vline(xintercept = 2018.5, linetype = “dotted”) + annotate(“text”, x = 2017.75, y = -1000000, label = “Adoption of theCharitable Deduction”, hjust = 1, size = 3, family = “Times New Roman”, lineheight = 0.8) + annotate(“segment”, x = 2017.8, xend = 2018.4, y = -1000000, yend = -1000000, arrow = arrow(length = unit(0.15, “inches”)), color = “black”) + scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = “M”)) + coord_cartesian(ylim = c(-1500000, 1500000)) + scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_totalcontributions\(year), max(placebo_gaps_data_long_totalcontributions\)year), by = 1)) + labs(x = “”, y = “in Median Contributions”, caption = “Note: Associated p-value is approximately 0.909.”) + theme_classic(base_family = “Times New Roman”) + theme(legend.position = “none”, panel.border = element_rect(color = “black”, fill = NA, size = 0.8), plot.caption = element_text(hjust = 0), plot.margin = unit(c(1,3,0,0), “lines”))

placebo_plot_allcontrol_totalcontributions

ggsave( filename = “Outcome_TotalContributions_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png”, plot = placebo_plot_allcontrol_totalcontributions, path = “/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/”, width = 6.5, height = 4.5, units = “in”, dpi = 300)

Placebo Gaps & P-Value with Control States with MSPE < 10 times AZ in Pre-Treatment Period

ratio_10mspecontrol_totalcontributions <- mspe.test(placebos_totalcontributions, discard.extreme = TRUE, mspe.limit = 10) ratio_10mspecontrol_totalcontributions$p.val

placebo_gaps_data_long_totalcontributions %>% summarize(n_mspe10_totalcontributions = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == “Y1”], 1, 0)))/11) - 1)

placebo_plot_mspe10_totalcontributions <- ggplot(data = filter(placebo_gaps_data_long_totalcontributions, pre_mspe <= 10 * pre_mspe[unit == “Y1”]), aes(year, gap, group = unit, colour = type, linewidth = type, alpha = type)) + geom_line() + scale_colour_manual(values = c(Treated = “black”, Placebo = “grey70”)) + scale_linewidth_manual(values = c(Treated = 0.9, Placebo = 0.5)) + scale_alpha_manual(values = c(Treated = 1, Placebo = 0.60)) + geom_hline(yintercept = 0, linetype = “dashed”) + geom_vline(xintercept = 2018.5, linetype = “dotted”) + annotate(“text”, x = 2017.75, y = -1000000, label = “Adoption of theCharitable Deduction”, hjust = 1, size = 3, family = “Times New Roman”, lineheight = 0.8) + annotate(“segment”, x = 2017.8, xend = 2018.4, y = -1000000, yend = -1000000, arrow = arrow(length = unit(0.15, “inches”)), color = “black”) + scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = “M”)) + coord_cartesian(ylim = c(-1500000, 1500000)) + scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_totalcontributions\(year), max(placebo_gaps_data_long_totalcontributions\)year), by = 1)) + labs(x = “”, y = “in Median Contributions”, caption = “Note: Discards states with pre-treatment MSPE 10 times higher than Arizona’s. Associated-value is approximately 0.909.”) + theme_classic(base_family = “Times New Roman”) + theme(legend.position = “none”, panel.border = element_rect(color = “black”, fill = NA, size = 0.8), plot.caption = element_text(hjust = 0), plot.margin = unit(c(1,3,0,0), “lines”))

placebo_plot_mspe10_totalcontributions

ggsave( filename = “Outcome_TotalContributions_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png”, plot = placebo_plot_mspe10_totalcontributions, path = “/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/”, width = 6.5, height = 4.5, units = “in”, dpi = 300)

Placebo Gaps & P-Value with Control States with MSPE < 5 times AZ in Pre-Treatment Period

ratio_5mspecontrol_totalcontributions <- mspe.test(placebos_totalcontributions, discard.extreme = TRUE, mspe.limit = 5) ratio_5mspecontrol_totalcontributions$p.val

placebo_gaps_data_long_totalcontributions %>% summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == “Y1”], 1, 0)))/11) - 1)

placebo_plot_mspe5_totalcontributions <- ggplot(data = filter(placebo_gaps_data_long_totalcontributions, pre_mspe <= 5 * pre_mspe[unit == “Y1”]), aes(year, gap, group = unit, colour = type, linewidth = type, alpha = type)) + geom_line() + scale_colour_manual(values = c(Treated = “black”, Placebo = “grey70”)) + scale_linewidth_manual(values = c(Treated = 0.9, Placebo = 0.5)) + scale_alpha_manual(values = c(Treated = 1, Placebo = 0.60)) + geom_hline(yintercept = 0, linetype = “dashed”) + geom_vline(xintercept = 2018.5, linetype = “dotted”) + annotate(“text”, x = 2017.75, y = -1000000, label = “Adoption of theCharitable Deduction”, hjust = 1, size = 3, family = “Times New Roman”, lineheight = 0.8) + annotate(“segment”, x = 2017.8, xend = 2018.4, y = -1000000, yend = -1000000, arrow = arrow(length = unit(0.15, “inches”)), color = “black”) + scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = “M”)) + coord_cartesian(ylim = c(-1500000, 1500000)) + scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_totalcontributions\(year), max(placebo_gaps_data_long_totalcontributions\)year), by = 1)) + labs(x = “”, y = “in Median Contributions”, caption = “Note: Discards states with pre-treatment MSPE 5 times higher than Arizona’s. Associated-value is approximately 0.909”) + theme_classic(base_family = “Times New Roman”) + theme(legend.position = “none”, panel.border = element_rect(color = “black”, fill = NA, size = 0.8), plot.caption = element_text(hjust = 0), plot.margin = unit(c(1,3,0,0), “lines”))

placebo_plot_mspe5_totalcontributions

ggsave( filename = “Outcome_TotalContributions_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png”, plot = placebo_plot_mspe5_totalcontributions, path = “/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/”, width = 6.5, height = 4.5, units = “in”, dpi = 300)

Placebo Gaps & P-Value with Control States with MSPE < 2 times AZ in Pre-Treatment Period

ratio_2mspecontrol_totalcontributions <- mspe.test(placebos_totalcontributions, discard.extreme = TRUE, mspe.limit = 2) ratio_2mspecontrol_totalcontributions$p.val

placebo_gaps_data_long_totalcontributions %>% summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == “Y1”], 1, 0)))/11) - 1)

placebo_plot_mspe2_totalcontributions <- ggplot(data = filter(placebo_gaps_data_long_totalcontributions, pre_mspe <= 2 * pre_mspe[unit == “Y1”]), aes(year, gap, group = unit, colour = type, linewidth = type, alpha = type)) + geom_line() + scale_colour_manual(values = c(Treated = “black”, Placebo = “grey70”)) + scale_linewidth_manual(values = c(Treated = 0.9, Placebo = 0.5)) + scale_alpha_manual(values = c(Treated = 1, Placebo = 0.60)) + geom_hline(yintercept = 0, linetype = “dashed”) + geom_vline(xintercept = 2018.5, linetype = “dotted”) + annotate(“text”, x = 2017.75, y = -1000000, label = “Adoption of theCharitable Deduction”, hjust = 1, size = 3, family = “Times New Roman”, lineheight = 0.8) + annotate(“segment”, x = 2017.8, xend = 2018.4, y = -1000000, yend = -1000000, arrow = arrow(length = unit(0.15, “inches”)), color = “black”) + scale_y_continuous(labels = label_dollar(scale = 1e-6, suffix = “M”)) + coord_cartesian(ylim = c(-1500000, 1500000)) + scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_totalcontributions\(year), max(placebo_gaps_data_long_totalcontributions\)year), by = 1)) + labs(x = “”, y = “in Median Contributions”, caption = “Note: Discards states with pre-treatment MSPE 2 times higher than Arizona’s. Associated-value is approximately 0.952”) + theme_classic(base_family = “Times New Roman”) + theme(legend.position = “none”, panel.border = element_rect(color = “black”, fill = NA, size = 0.8), plot.caption = element_text(hjust = 0), plot.margin = unit(c(1,3,0,0), “lines”))

placebo_plot_mspe2_totalcontributions

ggsave( filename = “Outcome_TotalContributions_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png”, plot = placebo_plot_mspe2_totalcontributions, path = “/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/”, width = 6.5, height = 4.5, units = “in”, dpi = 300)

Sample Subsets

Only States with Income Tax from 2013 - 2023

Subset Data

ds_state_slim_inctax <- ds_state_slim %>% 
  filter(!state %in% c("NV", "WY", "SD", "TX", 
                       "FL", "TN", "WA", "NH"))


ds_state_slim_inctax <- ds_state_slim_inctax %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "HI" ~ 6,
             state == "IA" ~ 7,
             state == "ID" ~ 8,
             state == "IL" ~ 9,
             state == "IN" ~ 10,
             state == "KS" ~ 11,
             state == "KY" ~ 12,
             state == "LA" ~ 13,
             state == "MD" ~ 14,
             state == "ME" ~ 15,
             state == "MI" ~ 16,
             state == "MO" ~ 17,
             state == "MS" ~ 18,
             state == "MT" ~ 19,
             state == "NC" ~ 20,
             state == "ND" ~ 21,
             state == "NE" ~ 22,
             state == "NJ" ~ 23,
             state == "NM" ~ 24,
             state == "NY" ~ 25,
             state == "OH" ~ 26,
             state == "OK" ~ 27,
             state == "OR" ~ 28,
             state == "PA" ~ 29,
             state == "RI" ~ 30,
             state == "SC" ~ 31,
             state == "UT" ~ 32,
             state == "VA" ~ 33,
             state == "VT" ~ 34,
             state == "WI" ~ 35,
             state == "WV" ~ 36))

Prepare Data (Inc Tax)

data_prep_out_inctax <- dataprep(
  foo = ds_state_slim_inctax,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_inctax$state_id[ds_state_slim_inctax$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state"
)

Generate Weights (Inc Tax)

synth_out_inctax <- synth(
  data.prep.obj = data_prep_out_inctax
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30710407 
## 
## solution.v:
##  0.01564976 0.03937487 0.01026201 0.06315022 0.09153573 0.0003093394 0.02987167 0.0002711815 0.005017991 0.1570765 0.02116504 0.2334114 0.1015717 0.08050662 0.150826 
## 
## solution.w:
##  2.615e-07 4.526e-07 0.2765036 1.7274e-06 0.3353562 3.805e-07 0.1339169 8.39597e-05 7.237e-07 1.72192e-05 4.447e-07 1.7827e-06 1.5058e-06 6.2644e-06 3.528e-07 1.3252e-06 0.000708253 9.676e-07 4.2989e-06 7.78e-08 7.178e-07 6.9922e-06 7.43e-08 9.5362e-06 7.216e-07 1.3611e-06 1.123e-07 1.9192e-06 6.1178e-06 5.33847e-05 0.2533092 2.0201e-06 8.352e-07 2.694e-07 7.8e-08
synth_AZ_median_contributions_inctax <- as.numeric(data_prep_out_inctax$Y0 %*% synth_out_inctax$solution.w)

Hypothesis Testing (Inc Tax)

placebos_inctax <- generate.placebos(
  dataprep.out = data_prep_out_inctax,
  synth.out = synth_out_inctax,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1699762 
## 
## solution.v:
##  0.09952139 0.07681708 0.01250219 0.0008184186 0.00809349 0.004032104 0.08428053 0.0006774126 3.75038e-05 0.0003075155 0.0001150619 0.1029674 0.05986584 0.1006802 0.4492838 
## 
## solution.w:
##  9.364e-06 3.2864e-06 3.2822e-06 1.4126e-06 0.05517635 1.22615e-05 5.5159e-06 0.1169392 6.429e-07 4.65702e-05 1.13724e-05 2.96736e-05 5.735e-06 0.000339414 0.184715 2.54804e-05 1.00493e-05 5.7291e-06 0.05230834 0.0001409985 0.1982534 1.8972e-06 1.9282e-06 0.0005644197 0.0008992424 1.45697e-05 6.5215e-06 8.722e-07 0.0007505782 4.085e-07 1.50784e-05 4.2735e-06 0.1018539 0.2878433 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29931654 
## 
## solution.v:
##  0.01724514 0.2088018 0.02547949 0.005904316 0.0005068427 0.1015112 0.2985278 1.09687e-05 0.000334495 2.78614e-05 0.0004925404 0.1094015 0.007138574 0.05306709 0.1715504 
## 
## solution.w:
##  2.5849e-06 8.3289e-06 3.7686e-06 2.6438e-06 1.2859e-06 1.73288e-05 6.2742e-06 1.9952e-06 3.455e-07 9.3722e-06 8.373e-07 0.001116067 2.2923e-06 6.2075e-06 3.2983e-06 5.29e-08 7.2458e-06 0.051235 9.2e-09 8.137e-07 0.1111704 2.1399e-06 0.001554801 1.767e-06 4.6763e-06 1.1212e-05 0.5203215 1.57886e-05 1.0957e-06 5.238e-07 0.1314493 5.1894e-06 3.9627e-06 0.1830319 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 49451.28 
## 
## solution.v:
##  0.08317939 0.01098897 0.002359026 0.1024007 0.08854733 0.008676993 0.1441737 0.128964 0.1235213 0.1062209 0.02240455 0.01391865 0.1440938 0.008650423 0.01190034 
## 
## solution.w:
##  1.81656e-05 2.6117e-06 1.1295e-06 0.1606935 1.7541e-06 0.0799959 3.5582e-06 1.1349e-06 1.8446e-06 1.9278e-06 3.2939e-06 1.3881e-06 1.0081e-06 1.4209e-06 1.5737e-06 8.2828e-06 9.124e-07 4.9373e-06 3.05e-08 1.3446e-06 9.8417e-06 0.01898508 0.05386609 1.5207e-06 0.3000943 0.2400985 9.108e-07 9.05e-07 0.0003595785 0.1458235 1.19924e-05 8.781e-07 1.0516e-06 1.29e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5283714 
## 
## solution.v:
##  9.64434e-05 0.00517319 0.02689689 5.2234e-06 0.03487079 0.01631428 0.008099651 0.0009541933 0.002952827 0.01232097 0.3022121 0.2475698 0.16514 0.08405661 0.09333704 
## 
## solution.w:
##  4.6863e-06 3.3869e-06 1.05205e-05 2.7112e-06 8.95272e-05 1.6001e-06 3.9193e-06 7.14957e-05 4.2004e-06 3.8148e-06 1.60902e-05 2.1826e-06 0.2592067 4.6495e-06 0.00134825 4.9794e-06 1.939e-06 5.0481e-06 0.3036121 1.659e-05 0.1841662 2.0684e-06 4.356e-07 2.0901e-05 2.00675e-05 1.3147e-06 2.86e-08 0.144652 1.39338e-05 0.1066456 5.6833e-05 6.8e-08 4.0416e-06 2.0924e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 143977339 
## 
## solution.v:
##  0.1208094 0.06210291 0.009066276 0.0380372 0.2307794 6.55542e-05 0.0008631256 0.1149947 0.01588575 0.005557082 0.06579411 0.09176404 0.1213201 0.06516383 0.05779652 
## 
## solution.w:
##  3.3e-09 7e-10 8.58e-08 2.02e-08 1.04e-08 1.08e-08 2.6e-08 5.2e-09 7.54e-08 4.9e-09 7.9e-09 7.2e-09 8.423e-07 4.2e-09 4.8e-09 1.74e-08 1.77e-08 7.6e-09 2.8e-09 3.25e-08 8.7e-09 9.7e-08 0.4012191 4.4e-09 1.29e-08 1.42e-08 4.2e-09 7e-09 3.22e-08 0.5987789 1.99e-08 6.099e-07 3.1e-09 2e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056830 
## 
## solution.v:
##  2.86899e-05 5.80679e-05 0.0319019 0.0001033892 0.006974387 8.50841e-05 2.4827e-05 0.002225705 0.02817217 6.64794e-05 0.04650374 0.3517533 0.3212234 0.1053149 0.1055639 
## 
## solution.w:
##  5.87e-08 1.355e-07 8.3e-09 3.13e-08 1.5e-09 1.5e-08 1.47e-08 1.86e-08 3.59e-07 1.129e-07 3e-08 7.31e-08 2.13e-08 3.33e-08 2.52e-08 3.84e-08 1.15e-08 1.85e-08 2.97e-08 4.04e-08 0.9999983 1.98e-08 9.4e-09 3.73e-08 1.04e-08 1.38e-08 5.29e-08 8.1e-08 1.87e-08 7e-10 3.37e-08 1.28e-08 1.227e-07 1.843e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 37765532 
## 
## solution.v:
##  0.03294886 0.08608646 0.02226811 0.106687 0.1356825 0.001968344 0.01472739 0.005434728 0.03689939 0.04145977 0.01416738 0.09843057 0.02268685 0.2098821 0.1706706 
## 
## solution.w:
##  1.567e-07 1.46e-08 0.09461074 8.8412e-06 7.60136e-05 7.738e-07 1.03793e-05 3.54e-07 2.0682e-06 1.4477e-06 1.5339e-06 2.7048e-06 7.37057e-05 5.861e-07 7.69e-07 6.6134e-06 2.0726e-06 0.324867 4.217e-07 6.514e-07 5.5055e-05 1.9417e-06 3.5599e-06 8.127e-07 9.905e-07 0.2659252 6.0956e-06 1.41705e-05 0.08023229 0.2340651 1.6634e-06 2.5615e-05 5.142e-07 1.558e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28303922 
## 
## solution.v:
##  0.01685306 0.003888203 0.006118047 0.06963809 0.07262798 0.0344827 0.01532061 0.0007087981 0.02382211 0.05003329 0.02822225 0.04062231 0.0668622 0.3676124 0.2031879 
## 
## solution.w:
##  3.054e-07 6.377e-07 2.1307e-06 8.126e-07 0.3408897 1.0718e-06 3.349e-07 2.60127e-05 0.08206941 5.544e-07 6.6155e-06 0.3863852 4.882e-07 9.344e-07 1.3048e-06 6.208e-07 4.545e-07 6.126e-07 0.05664233 8.4422e-06 3.318e-07 6.821e-07 6.27e-08 2.6823e-05 0.1145374 4.731e-07 0.01939223 1.2521e-06 5.813e-07 0 6.501e-07 1.117e-07 9.819e-07 4.233e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1351025 
## 
## solution.v:
##  0.0003952178 0.0003324656 5.70312e-05 0.00227347 0.01509563 0.03461213 0.001702881 0.05391514 0.1459852 0.02491622 5.749e-07 0.192381 0.3764802 0.146824 0.005028817 
## 
## solution.w:
##  2.03252e-05 1.13905e-05 4.4798e-06 3.61274e-05 4.9299e-06 1.59605e-05 4.6655e-06 3.0657e-06 9.7248e-06 1.50353e-05 1.14317e-05 6.3296e-06 1.39226e-05 1.27157e-05 0.4840711 9.4417e-06 0.0499943 0.2080273 3.5561e-06 7.7252e-06 9.6595e-06 7.4893e-06 2.5917e-06 2.5978e-06 0.141655 1.23348e-05 2.27803e-05 0.03318122 9.484e-06 0.05452644 0.02820633 1.29489e-05 4.16584e-05 2.58548e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 71479999 
## 
## solution.v:
##  0.04584014 0.09817572 0.07045116 0.03812707 0.0003914351 0.00484657 0.1137239 0.05917112 0.1118588 0.01364836 0.02309467 0.1498874 0.1677794 0.07487825 0.02812596 
## 
## solution.w:
##  3.07e-08 7.27e-08 2.5e-08 1.151e-07 2.6e-08 0.05234372 2.26e-08 2.276e-07 3.91e-08 9.41e-08 6.06e-08 5.513e-07 5.13e-08 5.55e-08 5.36e-08 0.3245792 4.5e-08 3.47e-08 4.918e-07 0.4457727 2e-10 1.112e-07 1.432e-07 5.57e-08 2.66e-08 2.87e-08 1.025e-07 0.1574293 2.74e-08 3.91e-08 6.99e-08 1.216e-07 6.13e-08 0.01987226 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1904960 
## 
## solution.v:
##  0.007280847 0.01153821 0.02842034 0.01595899 0.0007794365 0.1449584 0.01075273 0.005687501 0.001581823 7.61178e-05 0.0003656353 0.07440501 0.0859563 0.2880827 0.3241559 
## 
## solution.w:
##  0.0001026519 0.02234143 1.035e-07 4.484e-07 3.68e-08 0.3405243 0.06059646 4.32e-08 2.034e-07 4.372e-07 0.1312723 1.291e-07 7.1258e-06 2.712e-07 2.083e-07 1.3195e-06 9.425e-07 2.541e-07 0.1987992 3.1491e-06 3e-10 8.66194e-05 6.65e-08 2.345e-07 3.269e-07 3.459e-07 0.2460908 1.032e-07 2.367e-07 2.28e-08 1.142e-07 2.557e-07 6.5549e-06 0.0001632165 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 37061818 
## 
## solution.v:
##  0.08380102 0.1475057 0.006222174 0.05257454 0.3400727 0.0009467568 0.01479795 1.18279e-05 0.006140343 0.001231485 1.50781e-05 0.09539732 0.03050906 0.05368127 0.1670928 
## 
## solution.w:
##  5.3802e-06 1.3183e-06 7.8587e-06 4.1289e-06 2.0075e-06 7.4685e-06 0.1077401 3.8655e-06 9.23e-08 4.7603e-06 3.6017e-06 2.9852e-06 3.2647e-06 1.6975e-06 0.001064475 1.09923e-05 1.423e-06 1.454e-06 2.3703e-06 4.847e-06 1.11937e-05 2.1856e-06 2.3444e-06 0.6540223 6.4227e-06 1.4494e-06 3.1353e-06 2.798e-06 0.004098169 0.232966 5.7487e-06 1.829e-06 1.6545e-06 6.132e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18965280 
## 
## solution.v:
##  0.02284898 0.0003012725 0.00887833 0.0001290814 0.05960903 0.01897784 0.01708317 0.02301029 0.007152741 0.1751042 0.004932051 0.1594314 0.1648722 0.2170151 0.1206543 
## 
## solution.w:
##  3.64408e-05 2.908e-07 4.71998e-05 7.47531e-05 4.62371e-05 0.007146412 0.09327112 0.0008234225 3.98967e-05 0.0004477675 7.3748e-05 0.000207082 0.0001318901 0.1171873 4.29621e-05 9.46091e-05 6.88731e-05 1.68781e-05 0.00626148 3.5994e-05 2.173e-07 9.33239e-05 2.1125e-06 0.0002031216 2.97056e-05 6.69189e-05 0.2113732 0.07169936 7.91052e-05 4.25621e-05 0.4821895 0.0001003925 0.00020798 0.007858144 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 474865.9 
## 
## solution.v:
##  0.009494035 0.09232726 0.01771864 0.0515408 0.0007086475 4.96985e-05 0.1606078 0.0001145758 0.0004686549 6.3383e-06 0.003609861 0.3331895 0.00820181 0.1651791 0.1567832 
## 
## solution.w:
##  4.31571e-05 1.90845e-05 0.0001497412 0.009075654 0.0003598697 0.0003094531 3.80033e-05 0.0002089483 4.10101e-05 0.004828253 3.508e-05 0.0001642625 0.0002785844 6.62919e-05 8.75496e-05 0.00269551 0.1273543 0.0001038181 2.1845e-06 0.0002417583 0.32651 0.000193288 0.000117691 0.0001493514 6.2649e-05 0.0001209132 0.000124224 0.008358911 0.002264661 0.0001851154 0.0002302212 0.515466 9.42163e-05 2.02723e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8239381 
## 
## solution.v:
##  0.1577337 0.00288329 0.03636967 0.005486855 0.01073671 0.006910905 0.01161683 0.007412519 6.11441e-05 0.001286263 0.2801049 0.06208101 0.007167957 0.2290358 0.1811124 
## 
## solution.w:
##  0.0004753394 0.0001043152 7.82209e-05 1.92531e-05 3.26904e-05 3.7822e-05 0.0005168338 2.70082e-05 0.0003776431 1.8221e-05 0.0006938468 0.1015752 0.08843122 1.81153e-05 0.1838476 1.97093e-05 2.80779e-05 7.90385e-05 0.00448866 2.73026e-05 3.11738e-05 2.99863e-05 1.0246e-06 0.4575809 0.0003355026 0.02101559 6.538e-07 1.23266e-05 2.55367e-05 1.36246e-05 2.96629e-05 0.1399878 1.39011e-05 2.62452e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19228693 
## 
## solution.v:
##  0.08370238 0.00936172 0.001885834 0.001104362 0.2389201 0.1042686 0.04925489 0.006054648 0.05796303 0.1197813 0.05758402 0.06017187 0.01632708 0.01855265 0.1750675 
## 
## solution.w:
##  8.01966e-05 4.30915e-05 0.0005160559 0.0002945145 0.0001431835 0.0001326466 0.1311202 0.000491051 0.5858941 0.0001562472 0.0001226217 0.007613488 0.05955077 0.0004473686 0.001176643 5.5177e-06 9.79486e-05 0.000303362 0.03053354 0.0001207455 0.0004012259 0.0001025689 0.0009171324 0.0004260386 0.0001079335 0.0002420737 0.0006310177 0.0006961035 0.08361295 4.9208e-06 0.0001307605 0.0001257146 0.0001712364 0.093587 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11812262 
## 
## solution.v:
##  0.1341572 2.48364e-05 0.08654753 0.1140292 0.0001379899 0.09434192 0.00818619 5.9139e-06 0.0008922381 0.002214813 2.77155e-05 0.2072595 0.1547757 0.1750455 0.02235369 
## 
## solution.w:
##  3.34285e-05 0.2458147 3.3294e-06 2.4896e-06 1.3464e-06 3.0434e-06 2.5911e-06 8.048e-07 0.009783533 0.1195723 2.8802e-06 1.35428e-05 8.741e-07 1.4897e-06 3.006e-06 2.10507e-05 0.07427664 8.2525e-06 0 3.918e-05 1.604e-07 7.34064e-05 2.633e-07 1.17186e-05 0.1468315 3.3783e-06 1.9243e-06 3.7018e-06 1.53907e-05 3.04e-08 2.104e-06 8.035e-07 1.07302e-05 0.4034604 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22733796 
## 
## solution.v:
##  0.001685659 0.003933052 0.006408248 0.005362986 0.06019117 0.0509984 0.001425832 0.003884063 0.06823865 0.07132444 0.2835034 0.1906252 0.03622123 0.06249832 0.1536993 
## 
## solution.w:
##  0.000136221 0.2740651 1.6067e-06 5.9089e-06 0.3934526 6.3957e-06 0.0003239787 1.558e-06 2.69558e-05 1.0004e-06 7.6107e-06 1.9932e-06 4.8203e-06 0.02348865 2.3437e-06 3.6489e-06 1.255e-05 1.02279e-05 2.14122e-05 0.03318815 4.0014e-06 0.1931481 9.204e-07 3.4272e-06 1.22098e-05 3.72839e-05 2.2253e-06 1.6832e-06 8.1028e-06 0.0003906821 5.11147e-05 2.06154e-05 1.298e-05 0.08154389 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 904683.2 
## 
## solution.v:
##  0.03130295 0.0001556562 5.24855e-05 0.04614684 0.01127913 0.09921579 0.1023836 0.0004942477 5.24378e-05 0.003142864 0.06658743 0.3051914 0.218527 0.006109199 0.109359 
## 
## solution.w:
##  1.13824e-05 0.1099066 0.006670118 7.8425e-06 1.84776e-05 6.5983e-06 0.362608 0.000586557 0.2434529 8.8889e-06 7.8163e-06 6.8529e-06 0.0001706367 7.1267e-06 8.5596e-06 1.19051e-05 1.86207e-05 0.09042437 3.647e-06 5.5075e-06 1.03729e-05 1.23516e-05 0.0396208 9.4825e-06 1.16e-05 2.07503e-05 7.345e-07 0.08835994 1.33155e-05 0.057887 9.6357e-05 5.2475e-06 9.3013e-06 3.065e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 70752582 
## 
## solution.v:
##  0.01672512 0.0003723016 0.06180946 0.004068833 0.07128701 0.01076544 0.002245001 0.04382766 0.08387385 0.2739805 0.01729473 0.3010979 0.006601244 0.00256479 0.1034862 
## 
## solution.w:
##  1.613e-07 2.593e-07 3.29e-08 0.06838817 2.64e-08 0.2627743 9.77e-08 6.04e-08 2.384e-07 7.45e-08 2.842e-07 1.458e-07 1.098e-07 1.1e-09 1.938e-07 2.142e-07 8.49e-08 1.375e-07 9.25e-08 1.706e-07 8.99e-08 3.54e-08 2.85e-08 3.448e-07 1.029e-07 9.56e-08 0.6688141 1.349e-07 8.75e-08 4.3e-09 9.02e-08 9.3e-08 3.2407e-06 1.67425e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 34008902 
## 
## solution.v:
##  0.006844001 3.24957e-05 0.1693845 0.003850915 0.03833239 0.008150731 0.00865135 0.1823722 0.1404536 0.008499039 0.1103773 0.1202892 0.1426684 0.007616512 0.05247747 
## 
## solution.w:
##  1.8525e-06 2.482e-07 4.61e-08 2.296e-07 1.721e-07 0.5099805 6.54e-08 5.27e-08 3.2767e-06 0.2502646 2.171e-07 7.856e-07 4.1e-08 1.052e-07 9.42e-08 1.386e-07 3.82e-08 9.5275e-06 2.54e-07 4.051e-07 5e-10 6.637e-07 4.4e-09 4.564e-07 0.06863172 1.106e-07 4.41e-08 2.3e-08 0.1710992 1.2844e-06 1.7142e-06 1.6897e-06 1.366e-07 2.479e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17839461 
## 
## solution.v:
##  0.002043688 0.002215618 0.05072024 0.0008510855 0.107007 0.02896332 4.30075e-05 0.01024792 0.004020809 0.003550542 0.04085954 0.2109781 0.001277181 0.4519131 0.08530882 
## 
## solution.w:
##  4.02e-08 2.33e-08 2.97e-08 4.25e-08 6.4e-09 0.8676182 1.23e-08 3.92e-08 2.04e-08 1.6896e-06 3.22e-08 1.92e-08 5.44e-08 6.5e-08 2.21e-08 2.84e-08 2.171e-07 1.98e-08 2.19e-08 2.14e-08 1.118e-07 2.3e-08 5.65e-08 2.69e-08 3.64e-08 1.89e-08 3.93e-08 3.01e-08 7.15e-08 1.4e-09 0.1323789 2.03e-08 2.16e-08 1.29e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 67607347 
## 
## solution.v:
##  8.57612e-05 0.003314472 0.1097866 0.003103162 0.00524364 0.006360166 0.00202902 0.06752717 0.06911287 0.0001143359 0.04859277 0.2465821 0.3124289 0.09125739 0.03446165 
## 
## solution.w:
##  4.7682e-06 2.56e-08 4.8651e-06 1.3347e-06 1.8077e-06 1.1727e-06 0.1615643 5.6479e-06 2.19135e-05 0.239956 1.8309e-06 5.93001e-05 6.545e-07 1.1175e-06 2.1927e-06 6.7512e-06 0.0002181582 0.2420871 0.1048676 1.1021e-06 2.7105e-06 5.51e-07 8.791e-07 3.0743e-06 6.9647e-06 4.3535e-06 1.3894e-06 0.04851507 4.0385e-06 0.2026319 6.204e-07 9.15e-07 4.2045e-06 1.56254e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2235857 
## 
## solution.v:
##  0.01741931 0.004895766 0.02614381 0.0007923556 0.2168795 0.05862109 0.01559478 0.001017681 0.01715927 0.0005652909 0.00386025 0.1680395 0.1332601 0.2929926 0.04275876 
## 
## solution.w:
##  7.3e-09 1.07e-08 0.2433186 7.08e-08 0.1577272 1.75e-08 8.8e-09 1.5477e-06 2.37e-08 6.67e-08 1.05e-08 1.17e-08 4.4429e-06 2.88e-08 2.76e-08 2.48e-08 1.71e-08 1.54e-08 1.79e-08 1.33e-08 1.64e-08 1.42e-08 2.42e-08 1.65e-08 1.28e-08 2.37e-08 6.23e-08 3.247e-07 7.2e-09 0.2007555 0.3981917 5.35e-08 1.57e-08 1.2e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5442626 
## 
## solution.v:
##  0.0008950397 0.1616021 0.06798082 0.03711345 0.0003686528 0.01477265 0.07405693 0.09883209 0.04503843 0.01116847 0.06841923 0.05271115 0.1308441 0.0910956 0.1451013 
## 
## solution.w:
##  3.0397e-06 9.2198e-06 4.17586e-05 6.04987e-05 4.50692e-05 0.05601171 1.76718e-05 8.93026e-05 0.1735081 2.39709e-05 3.06361e-05 0.2546262 0.0002100608 4.42306e-05 0.0001404601 2.7626e-06 2.92464e-05 6.27777e-05 2.77274e-05 2.18334e-05 0.1636796 2.78654e-05 6.95551e-05 0.01423206 2.83469e-05 4.06467e-05 0.2232506 3.35056e-05 6.55825e-05 2.97245e-05 0.01827066 5.53978e-05 0.09517567 3.45172e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18184490 
## 
## solution.v:
##  0.03389906 0.06537561 0.01211369 0.08241836 0.2136325 0.000137544 0.07593801 5.04885e-05 0.002231181 0.00680298 0.002125021 0.07479534 0.1135579 0.1234215 0.1935008 
## 
## solution.w:
##  0.00323201 4.148e-06 0.2227987 2.1117e-06 0.004949772 5.4474e-06 1.1e-09 0.09956546 0.4129925 4.5019e-06 6.7793e-06 1.2388e-06 6.1877e-06 2.8954e-06 8.2232e-06 1.1343e-06 1.03864e-05 0.07292749 3.654e-07 0.06930009 6.84619e-05 1.18127e-05 3.5581e-06 1.04324e-05 5.3683e-06 2.8305e-06 2.2937e-06 6.732e-07 0.1139417 1.78e-08 0.0001265785 2.8067e-06 3.186e-06 8.234e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21796190 
## 
## solution.v:
##  0.1027597 0.08538949 0.0001191656 0.07859892 0.0003237388 0.1395549 0.1377951 0.03808234 0.1754663 0.07672866 0.01619138 0.08365771 0.06258961 0.0004391222 0.002303863 
## 
## solution.w:
##  1.972e-07 3.777e-07 0.2995342 5.4734e-06 2.29216e-05 6.042e-07 0.2363275 1.183e-07 1.0926e-06 3.15e-08 3.45e-07 6.157e-07 2.46e-08 6.634e-07 0.2863303 2.31e-07 6.84e-08 1.2341e-06 3.611e-07 5.06e-08 1.53e-07 6.81e-08 0.0001082407 2.4246e-06 9.475e-07 1.61e-07 3.981e-07 2.9064e-06 1.887e-07 0.08172471 2.58e-07 0.09563273 0.0003002011 8.82e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1193991 
## 
## solution.v:
##  0.02013933 0.002508675 0.04410596 1.5674e-06 2.17184e-05 0.2026823 5.63516e-05 0.007778778 0.0030168 0.0001005373 1.8666e-06 0.1868408 0.1667653 0.09310051 0.2728795 
## 
## solution.w:
##  2.8301e-06 7.1e-08 3.9834e-06 5.31633e-05 5.8198e-06 0.001396243 3.5514e-06 0.1348883 3.1359e-06 0.2372917 1.853e-05 7.6841e-06 3.6235e-06 0.01421103 5.0717e-06 3.8595e-06 4.925e-07 2.8216e-06 3.9291e-06 0.3868062 0.05231576 0.1726709 6.8741e-06 4.0288e-06 1.61694e-05 3.8038e-06 3.49e-06 0.0002351161 6.8798e-06 9.59e-07 2.2731e-06 7.6625e-06 9.4225e-06 4.625e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10093742 
## 
## solution.v:
##  0.02137285 0.003838039 0.09136356 0.1557358 0.0001199719 0.007770681 0.0004368763 0.004958125 5.39518e-05 3.196e-07 7.67625e-05 0.3660311 0.177853 0.00807064 0.1623183 
## 
## solution.w:
##  3.734e-07 3.712e-07 2.309e-07 1.9719e-06 8.34e-08 0.1440713 0.06072735 7.46e-08 2.216e-07 0.4649153 5.091e-07 0.03941103 1.669e-07 0.02885135 3.176e-07 3.274e-07 2.978e-07 1.153e-07 3.571e-07 2.69e-08 2.621e-07 5.623e-07 0.104203 9.41e-08 3.935e-07 1.452e-07 3.22e-07 3.419e-07 5.58e-07 0.1561252 2.469e-07 5.965e-07 5.827e-07 0.001685862 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 35205522 
## 
## solution.v:
##  0.004291548 0.00531125 0.2837237 0.05505693 0.02509834 0.01195753 0.1322157 0.01094561 0.01571477 7.23086e-05 0.1191129 0.05791502 0.01086158 0.005909747 0.2618131 
## 
## solution.w:
##  3.7714e-06 2.89e-07 0.0007483749 1.1331e-06 2.5305e-06 3.2282e-06 0.3054553 4.561e-07 7.18e-08 3.213e-07 5.954e-07 0.08381748 4.074e-07 9.273e-06 3.443e-07 4.907e-07 1.08979e-05 5e-10 1.9611e-06 7.7e-08 0.3523326 3.0803e-06 1.1145e-06 5.221e-07 1.0143e-06 0.1803163 8.424e-07 4.932e-07 5.087e-07 0.07723377 5.18006e-05 4.555e-07 4.64e-07 5.19e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 473385326 
## 
## solution.v:
##  0.007103792 0.01748026 0.0008668392 0.03337661 0.008833429 0.01634513 0.08462413 0.2101043 0.06152092 0.05850031 0.006549259 0.03124788 0.01825662 0.001327769 0.4438628 
## 
## solution.w:
##  5.1e-09 2.3e-09 4.13e-08 1.7e-09 0.9999998 1.5e-09 1.32e-08 2.9e-09 2e-08 2.1e-09 1.9e-09 2.1e-08 2.2e-09 1.1e-09 5.5e-09 1.14e-08 3.7e-09 9.4e-09 1.11e-08 1e-09 2.1e-09 1.2e-09 2.33e-08 2.7e-09 3.7e-09 8.8e-09 1.45e-08 9e-10 9e-10 1.35e-08 4e-09 6e-10 2.4e-09 3.4e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5110882 
## 
## solution.v:
##  0.05364074 0.005870878 0.09285717 0.02447134 0.0181126 0.002795688 0.1407204 0.006108851 0.08846981 0.03489815 0.01365557 0.1794508 0.00723372 0.1289794 0.2027349 
## 
## solution.w:
##  5.12077e-05 0.212682 0.09362676 3.69921e-05 5.1722e-06 1.0695e-06 1.41406e-05 7.91e-08 3.165e-07 2.11644e-05 1.14317e-05 6.2633e-06 0.08966557 3.31697e-05 5.7572e-06 7.3987e-06 0.0001952412 0.04370695 1.38695e-05 3.6283e-06 0.4278468 0.001297024 1.59836e-05 9.9739e-06 3.2232e-06 7.5579e-06 0.000383613 2.78087e-05 2.0755e-05 0.1297732 4.9243e-06 5.1743e-06 0.0005118225 3.878e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28277646 
## 
## solution.v:
##  0.03887936 0.02758171 0.001352714 0.01956296 0.0004337263 0.1360351 0.1048563 0.1523398 0.07196762 0.07360238 0.08548535 0.04710443 0.1286612 0.1002774 0.01186003 
## 
## solution.w:
##  1.291e-07 2.306e-07 2.027e-07 7.09e-08 0.05896193 1.623e-07 1.01348e-05 4.07e-08 1.91e-08 1.035e-07 8.265e-07 1.168e-07 2.53e-08 0.6453957 1.729e-07 3.51e-08 7.8e-08 3.8216e-06 1.921e-07 1.171e-07 6.51e-08 5.223e-07 2.10978e-05 3e-10 7.28e-08 7.3e-09 3.4417e-06 7.33e-08 5.7e-09 2.197e-07 0.2955998 2.78e-08 1.47e-07 4.669e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 246281.4 
## 
## solution.v:
##  0.001280243 0.002223562 0.02588147 0.006197793 0.0488526 0.0262771 0.09695908 0.01458103 1.78866e-05 0.03838649 0.0006083166 0.348949 0.03686539 0.2148313 0.1380888 
## 
## solution.w:
##  8.79661e-05 0.04601528 1.1998e-05 0.1237186 6.0697e-06 0.3296548 4.24229e-05 1.09256e-05 0.02993962 8.8346e-06 4.18388e-05 2.15228e-05 3.67005e-05 4.75039e-05 0.0001979295 2.89822e-05 1.11838e-05 0.09889624 2.03409e-05 0.0005345869 2.0422e-05 3.1831e-06 1.27031e-05 9.8953e-06 0.002289429 1.79579e-05 0.004701859 0.0001234167 1.5939e-06 1.68007e-05 3.5654e-06 2.17729e-05 1.54884e-05 0.3634285 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17077417 
## 
## solution.v:
##  0.05595485 0.01486003 0.02311449 3.206e-07 0.002316966 0.1041567 0.02916943 0.02186989 0.06622678 0.2832113 0.2104883 0.07598188 0.07084263 0.04168182 0.000124659 
## 
## solution.w:
##  5.091e-07 3.589e-07 4.36e-08 1.64e-08 3.56e-08 1.9e-09 8.372e-07 6.18e-08 4.61e-08 1e-10 3.133e-07 2.5624e-06 8.27e-08 2.18e-08 1.8502e-06 1.427e-07 0.3389117 5.417e-06 1.96e-07 5.397e-07 3.4e-09 5e-10 5.9899e-06 1.54e-08 1.337e-07 5.55e-08 1.388e-07 0 1e-10 8.5e-09 2.21e-08 1.41e-08 1.081e-07 0.6610687
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
mspe_test_inctax <- mspe.test(placebos_inctax, discard.extreme = FALSE)

mspe_test_inctax$p.val
## [1] 0.1388889
plot_placebos(placebos_inctax)

Placebo Gaps, MSPE Plot, & P-Value with All Control States
df_synthAZ_plot_inctax <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions, synth_AZ_median_contributions_inctax),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol_inctax <- mspe.test(placebos_inctax, discard.extreme = FALSE)

ratio_allcontrol_inctax$p.val
## [1] 0.1388889
pre_mspe_controlstates_inctax <- placebos_inctax$mspe.placs

pre_mspe_controlstates_inctax$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27","28","29","30",
                                 "31","32","33","34","35", "36")

pre_mspe_controlstates_inctax <- pre_mspe_controlstates_inctax %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe_inctax <- data.frame(pre_mspe = as.numeric(placebos_inctax$loss.v), unit = "Y1")

pre_mspe_data_inctax <- bind_rows(pre_mspe_controlstates_inctax, AZ_pre_mspe_inctax)

mspe_allcontrol_data_inctax <- ratio_allcontrol_inctax$test

mspe_allcontrol_data_inctax <- mspe_allcontrol_data_inctax %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

placebo_gaps_data_inctax <- placebos_inctax$df

## 1. synthetic values in long form
synthetic_long_inctax <- placebo_gaps_data_inctax %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

## 2. actual (observed) values in long form
actual_long_inctax <- placebo_gaps_data_inctax %>% 
  select(year, all_of(unique(synthetic_long_inctax$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

## join & compute gap (synthetic – actual)
placebo_gaps_data_long_inctax <- left_join(actual_long_inctax, synthetic_long_inctax,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long_inctax <- inner_join(placebo_gaps_data_long_inctax, pre_mspe_data_inctax, by = "unit")

placebo_plot_allcontrol_inctax <- ggplot(placebo_gaps_data_long_inctax,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_inctax$year), max(placebo_gaps_data_long_inctax$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.139.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol_inctax

ggsave(
  filename = "IncTax_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol_inctax,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

# Remaining MSPE <10, <5, <2 chunks follow this same pattern.
ratio_10mspecontrol_inctax <- mspe.test(placebos_inctax, discard.extreme = TRUE, mspe.limit = 10)
ratio_10mspecontrol_inctax$p.val
## [1] 0.1428571
placebo_gaps_data_long_inctax %>%
  summarize(n_mspe10_inctax = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10_inctax
##             <dbl>
## 1              34
placebo_plot_mspe10_inctax <- ggplot(data = filter(placebo_gaps_data_long_inctax, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_inctax$year), max(placebo_gaps_data_long_inctax$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than Arizona's. Associated\np-value is approximately 0.143.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10_inctax

ggsave(
  filename = "IncTax_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10_inctax,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
ratio_5mspecontrol_inctax <- mspe.test(placebos_inctax, discard.extreme = TRUE, mspe.limit = 5)
ratio_5mspecontrol_inctax$p.val
## [1] 0.1428571
placebo_gaps_data_long_inctax %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      34
placebo_plot_mspe5_inctax <- ggplot(data = filter(placebo_gaps_data_long_inctax, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_inctax$year), max(placebo_gaps_data_long_inctax$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than Arizona's. Associated\np-value is approximately 0.143\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5_inctax

ggsave(
  filename = "IncTax_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5_inctax,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
ratio_2mspecontrol_inctax <- mspe.test(placebos_inctax, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol_inctax$p.val
## [1] 0.1612903
placebo_gaps_data_long_inctax %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      30
placebo_plot_mspe2_inctax <- ggplot(data = filter(placebo_gaps_data_long_inctax, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_inctax$year), max(placebo_gaps_data_long_inctax$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than Arizona's. Associated\np-value is approximately 0.161\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2_inctax

ggsave(
  filename = "IncTax_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2_inctax,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Only States with Income Tax from 2013 - 2023 & Charitable Deduction in 2025

Subset Data

ds_state_slim_charitablededuction <- ds_state_slim_inctax %>% 
  filter(!state %in% c("CT", "IL", "IN", "MI",
                       "NJ", "OH", "PA", "RI", "WV"))


ds_state_slim_charitablededuction <- ds_state_slim_charitablededuction %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "HI" ~ 5,
             state == "IA" ~ 6,
             state == "ID" ~ 7,
             state == "KS" ~ 8,
             state == "KY" ~ 9,
             state == "LA" ~ 10,
             state == "MD" ~ 11,
             state == "ME" ~ 12,
             state == "MO" ~ 13,
             state == "MS" ~ 14,
             state == "MT" ~ 15,
             state == "NC" ~ 16,
             state == "ND" ~ 17,
             state == "NE" ~ 18,
             state == "NM" ~ 19,
             state == "NY" ~ 20,
             state == "OK" ~ 21,
             state == "OR" ~ 22,
             state == "SC" ~ 23,
             state == "UT" ~ 24,
             state == "VA" ~ 25,
             state == "VT" ~ 26,
             state == "WI" ~ 27))

Prepare Data (Charitable Deduction)

data_prep_out_charitablededuction <- dataprep(
  foo = ds_state_slim_charitablededuction,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_charitablededuction$state_id[ds_state_slim_charitablededuction$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state"
)

Generate Weights (Charitable Deduction)

synth_out_charitablededuction <- synth(
  data.prep.obj = data_prep_out_charitablededuction
)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22340040 
## 
## solution.v:
##  0.004360802 0.007424672 0.0002060715 0.06806918 0.06883407 0.001049925 0.01967407 0.0001809554 0.0001130929 0.2245686 0.0004640769 0.2255655 0.188346 0.1381738 0.05296923 
## 
## solution.w:
##  2.7224e-06 2.6875e-06 0.1812242 0.3854462 1.2766e-06 0.02086703 1.10967e-05 2.6212e-06 4.2571e-06 3.9714e-06 6.1815e-06 3.7559e-06 1.2957e-06 7.9873e-06 9.1252e-06 2.97e-07 2.4455e-06 5.1428e-06 7.8233e-06 5.8102e-06 2.4133e-06 0.0787291 0.3336397 5.0338e-06 6.4911e-06 1.3227e-06
data_prep_out_charitablededuction$Y0 %*% synth_out_charitablededuction$solution.w
##      w.weight
## 2013 220268.2
## 2014 222490.0
## 2015 229292.6
## 2016 235668.1
## 2017 233175.4
## 2018 230662.2
## 2019 197382.3
## 2020 252090.2
## 2021 290406.0
## 2022 341992.7
## 2023 350383.5
synth_AZ_median_contributions_charitablededuction <- data_prep_out_charitablededuction$Y0 %*% synth_out_charitablededuction$solution.w

Hypothesis Testing (Charitable Deduction)

placebos_charitablededuction <- generate.placebos(
  dataprep.out = data_prep_out_charitablededuction,
  synth.out = synth_out_charitablededuction,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4137778 
## 
## solution.v:
##  0.0002368033 0.2661378 0.08783531 0.008317698 0.03306668 0.0004942607 0.1163269 3.07e-07 3.3711e-06 4.07231e-05 5.016e-07 0.1945511 0.1389122 0.01206599 0.1420103 
## 
## solution.w:
##  0.1084612 2.35672e-05 1.11653e-05 0.08505629 7.9517e-06 1.3196e-05 0.07529122 1.70227e-05 4.47418e-05 2.04867e-05 0.250535 1.60064e-05 3.01473e-05 3.13381e-05 0.06496221 4.56888e-05 2.79071e-05 0.0001120015 0.002267894 5.33062e-05 1.97497e-05 1.8299e-06 7.51507e-05 5.26102e-05 0.4128224 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7632642 
## 
## solution.v:
##  0.002653381 0.2247793 0.1617957 0.001359456 4.1055e-06 0.04714647 0.007875324 1.5372e-06 0.003773715 1.7792e-06 0.0002982813 0.04979487 0.0001163495 0.2999032 0.2004966 
## 
## solution.w:
##  0.001478133 1.49e-08 3.52e-08 0.05359109 1.84e-08 0.5227504 0.270998 2.623e-07 1.9746e-06 1.233e-07 8.1276e-06 2.2e-09 2.215e-07 0 6.2581e-06 2.894e-06 1.706e-07 9.21761e-05 1.2131e-06 1.344e-07 6.97e-08 4.19e-08 0.1510668 1.57e-07 1.6714e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 71642.65 
## 
## solution.v:
##  0.180733 0.006932319 0.008071906 0.09795853 0.09908883 0.0001201295 0.06490226 0.05167964 0.03307672 0.03740266 0.007706664 0.183963 0.1501065 0.01039961 0.06785813 
## 
## solution.w:
##  2.22088e-05 1.51782e-05 0.2268669 4.3701e-06 0.02618109 7.0422e-06 6.2921e-06 1.7186e-05 6.2792e-06 4.8441e-06 1.19449e-05 1.93295e-05 5.2581e-06 6.0437e-05 1.979e-07 3.8012e-06 0.0565987 6.27529e-05 0.2130416 0.2645845 0.08348023 0.1289637 2.72149e-05 3.6454e-06 5.372e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 143977264 
## 
## solution.v:
##  0.06069101 0.01190667 0.001811579 0.00387642 0.04923452 3.2768e-06 0.04230813 0.2487886 0.001293385 0.01725622 0.2962144 0.002718204 0.1577588 0.09365007 0.01248879 
## 
## solution.w:
##  1.53e-08 1e-08 3.423e-07 1.75e-08 7.25e-08 3.48e-08 2.1e-08 2.12e-08 1.37e-08 4.7e-08 1.88e-08 3e-08 1.9e-08 3.7e-08 1.16e-08 2.59e-08 7.56e-08 0.4011981 5.93e-08 5.44e-08 5.1e-08 0.5988009 2.83e-08 3.4e-09 9.8e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 469290735 
## 
## solution.v:
##  0.001772212 6.85578e-05 0.02273348 0.0007471532 0.01772876 0.001163668 0.2258384 0.1412801 0.001267268 0.0004176216 0.09836876 0.4608428 0.01224466 0.006584912 0.008941597 
## 
## solution.w:
##  4.753e-07 1.364e-07 2.09e-08 3e-09 2.3e-08 6.19e-08 8.754e-07 4.12e-08 4.15e-08 3.91e-08 5.1e-08 7.73e-08 1.88e-08 2.8e-08 0.6642321 0.3357657 2.12e-08 1.77e-08 5.79e-08 3.22e-08 9.55e-08 9e-10 8.58e-08 2.87e-08 4.15e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 40180066 
## 
## solution.v:
##  0.0006522623 0.1131882 0.04949899 0.1369806 0.01646141 0.01643094 0.03310636 0.05635521 0.05475292 0.05847141 0.1209335 0.1227462 0.07275167 0.1445227 0.003147695 
## 
## solution.w:
##  4.8621e-06 2.02065e-05 0.1776023 0.05796702 7.701e-06 9.8552e-06 1.74456e-05 6.8926e-06 4.2277e-06 0.0003009885 4.6796e-06 2.36121e-05 6.6964e-06 3.7355e-05 1.7602e-06 3.3661e-06 8.9767e-06 3.6869e-06 4.5297e-06 0.3021971 0.2515507 0.2099951 7.6541e-06 0.0002086654 4.6036e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 77098781 
## 
## solution.v:
##  5.25435e-05 0.02382711 0.06647973 0.02778399 0.008650638 0.1598189 0.122568 0.03101416 0.01571697 0.005786426 0.04725954 0.1701236 0.1571598 0.09089343 0.07286517 
## 
## solution.w:
##  2.97e-08 6.82e-08 3.24e-08 2.09e-08 0.07508273 1.35e-08 1.42e-08 4.85e-08 0.1070868 6.6e-09 8.32e-08 0.5027353 5.37e-08 3.72e-08 9.48e-08 0.3150862 6.54e-08 2.826e-07 3.56e-08 2.41e-08 2.3e-08 9.07e-08 7.9004e-06 3.38e-08 2.99e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2521811 
## 
## solution.v:
##  0.2591519 0.006383254 0.01963103 0.06137895 0.0006759764 0.0385364 0.002508111 0.003011219 2.30468e-05 3.146e-06 0.007643189 0.01936104 0.04505644 0.2458626 0.2907737 
## 
## solution.w:
##  3.985e-07 0.1450964 3.1375e-06 0.02416385 0.4333895 0.08788071 1.7659e-06 0.09700345 3.2932e-06 3.52359e-05 1.3904e-06 1.1051e-06 3.4067e-06 7.3303e-06 0.2123836 3.5098e-06 7.2351e-06 1.7997e-06 1.8168e-06 3.7887e-06 2.83e-07 1.811e-07 1.6562e-06 6.64e-08 5.046e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30835806 
## 
## solution.v:
##  0.04600926 0.04764705 0.001950742 0.2813971 0.06285768 6.26351e-05 0.0007995459 0.2692576 0.0006564083 4.91891e-05 0.000154083 0.04360102 0.104548 0.1179744 0.02303518 
## 
## solution.w:
##  0.1536484 4.7495e-05 4.9739e-06 1.2047e-05 0.008222938 0.2347271 2.49922e-05 0.2517508 4.39936e-05 2.18254e-05 0.01391468 2.19949e-05 2.2647e-05 2.868e-07 8.1976e-06 5.91621e-05 9.54207e-05 2.35447e-05 1.3173e-05 0.2028599 5.25321e-05 0.1283276 6.03355e-05 1.358e-07 0.006035806 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15505110 
## 
## solution.v:
##  0.005226363 0.0001365356 0.01616081 0.003236779 0.03339057 0.1877312 0.09210024 0.02721542 0.0005216916 3.49162e-05 3.78668e-05 0.07109528 0.3141879 0.2425593 0.00636509 
## 
## solution.w:
##  6.325e-07 0.0002555542 4.42e-07 1.194e-07 0.1633017 0.2052183 1.9583e-06 1.75102e-05 3.2285e-06 2.63e-08 3.1893e-06 2.547e-07 3.666e-07 2.535e-06 0.0001133226 3.623e-07 3.246e-07 6.02119e-05 2.316e-07 1.1455e-06 1.503e-07 1.30626e-05 0.6309654 1.83491e-05 2.17666e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2171256 
## 
## solution.v:
##  0.03564299 0.0007700808 0.01474918 2.0865e-06 0.04666914 0.117978 0.02080026 2.78013e-05 0.002407364 0.02593317 1.83951e-05 0.2860369 0.009331038 0.4328906 0.006742998 
## 
## solution.w:
##  1.4121e-06 1.151e-06 1.5567e-06 0.007662201 4.576e-07 7.5798e-06 0.04738624 2.0492e-06 1.6511e-06 2.0693e-06 1.4544e-06 1.06107e-05 1.91598e-05 1.8321e-06 0.1191369 0.3098512 3.6205e-06 1.4055e-06 1.7104e-06 2.2696e-06 6.2666e-06 5.166e-07 1.6863e-06 0.5158923 2.7776e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28419522 
## 
## solution.v:
##  0.002005449 0.003593348 0.001853144 0.03501557 0.0005227214 0.2231349 0.2282486 0.002466263 0.03477658 0.06651561 0.07253156 0.002184268 0.05431873 0.03589556 0.2369377 
## 
## solution.w:
##  0.02244638 0.001369016 0.000408467 0.00012488 0.001894521 0.00038779 0.003071978 0.0007136474 0.2952409 0.1205058 0.0003639388 0.0007533358 0.0002695066 0.0008591752 0.0288841 0.235888 0.0002531084 0.01275665 0.0385049 0.0004352679 0.000392223 0.2261919 0.00258671 0.0002935301 0.005404227 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22562496 
## 
## solution.v:
##  0.01901763 6.6695e-06 0.1642523 0.08590088 2.1207e-06 0.04280986 0.05153722 0.02992954 0.07523314 0.01976268 0.02206691 0.1085672 0.09435435 0.2693389 0.01722052 
## 
## solution.w:
##  0.2573447 0.04821327 3.03991e-05 7.2113e-06 -2e-10 3.92993e-05 0.4082944 2.39505e-05 7.15138e-05 3.92081e-05 7.7198e-06 0.0008661338 0.06904033 3.44499e-05 0.06979583 1.4502e-06 0.0005190198 1.40678e-05 0.1445129 2.00789e-05 0.001040835 5.2367e-06 2.3193e-06 5.2917e-06 7.04069e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 59527567 
## 
## solution.v:
##  0.08808213 0.00943138 0.001049795 0.0349533 0.1701907 0.06701477 0.03158038 0.07722611 0.07624162 0.09554448 0.006724633 0.0790827 0.08200794 0.08544331 0.09542678 
## 
## solution.w:
##  0.0001403123 0.003844626 1.6727e-06 9.59e-08 2.30436e-05 0.0009166803 0.0001471262 3.23706e-05 3.6573e-06 3.4223e-06 3.38903e-05 2.4894e-06 0.06472769 0.000115421 0.3342886 0.00908539 0.2913114 3.255e-07 5.5437e-06 1.22808e-05 0.0003829151 0.2872501 0.0001134469 0.007512947 4.45084e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2127695 
## 
## solution.v:
##  0.1260101 0.0003667658 0.0001933915 0.2118756 0.002366248 0.04456038 0.09801928 0.009445963 0.005184556 0.01113627 0.02005347 0.3216155 0.04216565 0.02115434 0.08585253 
## 
## solution.w:
##  3.4882e-06 0.1775062 0.1238991 4.05444e-05 3.024e-06 0.2958366 1.322e-06 5.5029e-06 0.006578538 3.9762e-06 4.5649e-06 0.2083931 2.515e-07 0.1010117 1.0508e-06 2.0916e-06 3.15882e-05 1.16621e-05 0.0004349382 8.1528e-06 5.3528e-06 0.08615995 7.833e-07 1.7962e-06 5.47214e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 67607136 
## 
## solution.v:
##  0.01453839 0.006035576 0.02480485 0.03160412 0.1245098 0.1478822 0.02240076 0.005097208 0.00129809 0.002017501 0.01104094 0.4397627 0.008903705 0.01027758 0.1498265 
## 
## solution.w:
##  1.65e-08 0 3.35e-08 6.69e-08 0.160523 4.61e-08 8.15309e-05 0.8390284 1.78e-07 0.0001208707 2.44599e-05 8.026e-07 2.5965e-06 1.5543e-06 7.11e-08 0.0002053817 7.27e-08 1.683e-07 1.544e-07 5.07e-08 1.637e-07 4.5e-09 1.278e-07 1.2779e-06 8.9086e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12940226 
## 
## solution.v:
##  0.001299222 0.01275814 0.006833804 0.0004024641 0.1207116 0.000112566 0.001068567 0.0875621 0.2284286 0.03509316 0.003834001 0.1672659 0.2712669 0.01157925 0.05178373 
## 
## solution.w:
##  3.86e-07 4.1824e-06 2.7314e-06 7.9836e-06 0.4006695 3.1452e-06 0.00390865 8.1636e-06 7.0583e-06 5.7943e-06 0.0001760832 7.4115e-06 7.5338e-06 0.0001079354 6.4538e-06 2.39876e-05 6.2807e-06 2.3441e-06 1.0255e-06 4.0873e-06 1.3645e-06 7.989e-07 0.5950088 2.19131e-05 6.3856e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 74833298 
## 
## solution.v:
##  0.001744972 0.03215476 0.05691482 0.03248004 6.7247e-06 0.01258841 0.03825199 0.05940806 0.002477112 0.05078443 0.1331928 0.1602083 0.1894519 0.07127049 0.1590653 
## 
## solution.w:
##  1.489e-07 0.2383061 2.40733e-05 5.1813e-06 1.6083e-06 3.4e-09 1.2476e-06 5.7392e-06 0.0003040801 1.07312e-05 1.4028e-06 1.7951e-06 4.01844e-05 0.3058135 1.08055e-05 5.151e-07 6.896e-07 5.1353e-06 5.862e-07 2.5815e-06 0.1764015 0.2767566 9.9e-07 5.3809e-06 0.002299405 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2225898 
## 
## solution.v:
##  0.1330033 0.082004 0.1804065 0.0003511823 0.1361078 0.1879124 0.1406126 0.01524162 0.0225931 0.01041751 0.0002092379 0.05078778 0.03097933 0.0001721283 0.009201552 
## 
## solution.w:
##  3.47e-08 1.328e-07 0.2552076 0.1516383 1.306e-07 1.09e-08 2.03e-08 1.01e-07 1.33e-08 1.40876e-05 4.51e-08 1.803e-07 1.51e-08 3.1e-09 1.036e-07 4.75e-08 4.08e-08 4.54e-08 1.18e-07 1.006e-07 7.5e-09 0.1977057 0.3953474 8.57567e-05 1.45e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 14506843 
## 
## solution.v:
##  0.02262081 0.1021496 0.000425567 6.06681e-05 0.07323665 0.03218182 0.0009828562 0.0008159596 0.003517017 0.02538143 0.0009400216 0.2059325 0.3612088 0.003992374 0.166554 
## 
## solution.w:
##  0.0006928369 1.72275e-05 0.1220386 6.65e-08 8.7954e-06 6.8474e-06 6.4551e-06 1.6042e-05 1.10703e-05 1.38032e-05 5.5726e-06 0.0001685156 1.37962e-05 0.3674033 1.99207e-05 0.1103415 1.49065e-05 7.4801e-06 9.524e-06 0.2831693 0.1159952 2.601e-07 2.31849e-05 4.034e-06 1.17135e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 26163257 
## 
## solution.v:
##  0.1389059 1.31e-08 0.003129147 0.07345476 7.838e-07 0.0001857416 0.2296981 0.0282899 0.1970132 0.0932855 0.1158823 0.1166914 0.0009778389 3.59013e-05 0.002449455 
## 
## solution.w:
##  2.5789e-06 4.3105e-06 0.5588717 1.05334e-05 0.06090663 0.2929518 5.6888e-06 6.505e-07 4.15061e-05 0.0001621622 0.06100569 1.3744e-05 8.5089e-06 5.19541e-05 5.6763e-06 3.12694e-05 2.3207e-06 5.98766e-05 1.47304e-05 2.5661e-06 1.22506e-05 0.005815593 2.96305e-05 0.01827488 0.001713697 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 36267568 
## 
## solution.v:
##  0.06258335 0.0004841897 0.1548653 0.3090401 0.04661152 0.1636421 0.04047298 0.02969173 0.001787495 9.35687e-05 0.01280171 0.06308947 0.07829535 0.001167491 0.03537367 
## 
## solution.w:
##  7.909e-07 2.1301e-06 0.0002040626 8.0073e-06 1.40862e-05 0.3365004 3.339e-06 2.7027e-06 0.1640418 1.0735e-06 5.6525e-06 2.7566e-06 1.8855e-06 1.16e-08 4.4384e-06 2.522e-07 0.277689 0.003690493 5.071e-07 0.2177996 7.6152e-06 2.9848e-06 1.25841e-05 9.855e-07 2.8191e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 473385282 
## 
## solution.v:
##  0.0005676631 0.05705341 0.01738582 0.1106861 0.002658961 0.002810736 0.007661299 0.4787007 0.01824353 0.002062231 0.003371877 0.07917956 0.0006072672 0.003762751 0.2152481 
## 
## solution.w:
##  3.8e-09 3.5e-09 1.53e-08 0.9999998 4.1e-09 1.21e-08 2.5e-09 3.3e-09 1.35e-08 3.7e-09 3.9e-09 6.9e-09 2.4e-09 1.17e-08 8.2e-09 1.8e-09 4.3e-09 1.95e-08 5.9e-09 4.2e-09 2.66e-08 7.2e-09 6.6e-09 0 6.8e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4424556 
## 
## solution.v:
##  0.01940219 1.255e-07 0.05709532 0.006608042 0.0260445 0.002682102 0.0677265 0.1168472 0.3018875 0.02624064 8.3902e-06 0.1281466 0.05919968 0.008294954 0.1798163 
## 
## solution.w:
##  2.772e-07 0.1595156 0.06115928 9.7562e-06 6.47685e-05 0.0005236593 0.06805007 1.83474e-05 2.2764e-06 0.0911051 0.0007213227 2.8543e-06 9.5267e-06 0.05385996 2.60654e-05 5.483e-06 0.3972658 2.1954e-06 2.5258e-06 2.25228e-05 2.03697e-05 0.1675982 5.083e-07 8.508e-06 5.036e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13205417 
## 
## solution.v:
##  5e-08 0.0136592 8.73637e-05 3.168e-07 0.1904882 0.1103556 0.0803501 0.01663394 0.07921538 0.134345 1.517e-07 0.05263433 0.2153661 0.0005086304 0.1063556 
## 
## solution.w:
##  1.9429e-06 3.6728e-06 1.02285e-05 0.06081737 3.4092e-06 0.3483251 3.6318e-06 6.6008e-06 1.7959e-06 1.04011e-05 0.3343024 1.9673e-06 2.914e-06 1.55587e-05 6.7353e-06 4.6157e-06 1.5474e-06 5.7573e-06 0.0003437505 2.6979e-06 0.2269354 3.9291e-06 0.02917982 5.751e-06 2.9739e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3747271 
## 
## solution.v:
##  0.008059694 0.07746674 0.02111333 0.168313 0.004587214 0.0685403 0.08951521 0.02238703 0.0006420483 0.001664709 0.0002937619 0.04656064 0.2547786 0.2164693 0.01960837 
## 
## solution.w:
##  0.3018146 2.10241e-05 1.61e-07 5.37e-08 0.4356017 9.776e-07 7.05e-08 4.9241e-05 2.506e-07 8.061e-07 1.8068e-06 1.672e-07 9.44e-08 0.2439998 5.097e-07 0.01849566 1.827e-07 1.286e-06 1.858e-07 9.31e-08 6.2615e-06 1.321e-07 2.13e-08 6.45e-08 4.8212e-06
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
mspe_test_charitablededuction <- mspe.test(placebos_charitablededuction, discard.extreme = FALSE)

mspe_test_charitablededuction$p.val
## [1] 0.1111111
Placebo Gaps, MSPE Plot, & P-Value with All Control States
df_synthAZ_plot_charitablededuction <- data.frame(
  year = rep(years, 2),
  value = c(real_AZ_median_contributions, synth_AZ_median_contributions_charitablededuction),
  group = rep(c("Arizona", "Synthetic Arizona"), each = length(years)))

ratio_allcontrol_charitablededuction <- mspe.test(placebos_charitablededuction, discard.extreme = FALSE)

ratio_allcontrol_charitablededuction$p.val
## [1] 0.1111111
pre_mspe_controlstates_charitablededuction <- placebos_charitablededuction$mspe.placs

pre_mspe_controlstates_charitablededuction$unit <- c("1","2","4","5","6","7","8","9","10",
                                 "11","12","13","14","15","16","17","18","19","20",
                                 "21","22","23","24","25","26","27")

pre_mspe_controlstates_charitablededuction <- pre_mspe_controlstates_charitablededuction %>% rename(pre_mspe = `unlist(mspe.placs)`)

AZ_pre_mspe_charitablededuction <- data.frame(pre_mspe = as.numeric(placebos_charitablededuction$loss.v), unit = "Y1")

pre_mspe_data_charitablededuction <- bind_rows(pre_mspe_controlstates_charitablededuction, AZ_pre_mspe_charitablededuction)

mspe_allcontrol_data_charitablededuction <- ratio_allcontrol_charitablededuction$test

mspe_allcontrol_data_charitablededuction <- mspe_allcontrol_data_charitablededuction %>%
  mutate(type = ifelse(unit == "AZ", "AZ", "control units"))

placebo_gaps_data_charitablededuction <- placebos_charitablededuction$df

synthetic_long_charitablededuction <- placebo_gaps_data_charitablededuction %>% 
  select(year, starts_with("synthetic.")) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "synthetic"
  ) %>% 
  mutate(unit = str_remove(unit, "synthetic\\."))

actual_long_charitablededuction <- placebo_gaps_data_charitablededuction %>% 
  select(year, all_of(unique(synthetic_long_charitablededuction$unit))) %>% 
  pivot_longer(
    cols      = -year,
    names_to  = "unit",
    values_to = "actual"
  )

placebo_gaps_data_long_charitablededuction <- left_join(actual_long_charitablededuction, synthetic_long_charitablededuction,
                       by = c("year", "unit")) %>% 
  mutate(
    gap  = actual - synthetic,                       
    type = ifelse(unit == "Y1", "Treated", "Placebo"))

placebo_gaps_data_long_charitablededuction <- inner_join(placebo_gaps_data_long_charitablededuction, pre_mspe_data_charitablededuction, by = "unit")

placebo_plot_allcontrol_charitablededuction <- ggplot(placebo_gaps_data_long_charitablededuction,
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_charitablededuction$year), max(placebo_gaps_data_long_charitablededuction$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Associated p-value is approximately 0.111.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_allcontrol_charitablededuction

max(ds_state_slim_charitablededuction$state_id)
## [1] 27
ggsave(
  filename = "CharitableDeduction_PlaceboPlot_AllControl_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_allcontrol_charitablededuction,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
ratio_10mspecontrol_charitablededuction <- mspe.test(placebos_charitablededuction, discard.extreme = TRUE, mspe.limit = 10)
ratio_10mspecontrol_charitablededuction$p.val
## [1] 0.12
placebo_gaps_data_long_charitablededuction %>%
  summarize(n_mspe10_charitablededuction = ((sum(ifelse(pre_mspe <= 10 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe10_charitablededuction
##                          <dbl>
## 1                           24
placebo_plot_mspe10_charitablededuction <- ggplot(data = filter(placebo_gaps_data_long_charitablededuction, pre_mspe <= 10 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_charitablededuction$year), max(placebo_gaps_data_long_charitablededuction$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 10 times higher than Arizona's, resulting\nin 24 placebo states. Associated p-value is approximately 0.120.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe10_charitablededuction

ggsave(
  filename = "CharitableDeduction_PlaceboPlot_MSPE10_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe10_charitablededuction,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
ratio_5mspecontrol_charitablededuction <- mspe.test(placebos_charitablededuction, discard.extreme = TRUE, mspe.limit = 5)
ratio_5mspecontrol_charitablededuction$p.val
## [1] 0.125
placebo_gaps_data_long_charitablededuction %>%
  summarize(n_mspe5 = ((sum(ifelse(pre_mspe <= 5 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe5
##     <dbl>
## 1      23
placebo_plot_mspe5_charitablededuction <- ggplot(data = filter(placebo_gaps_data_long_charitablededuction, pre_mspe <= 5 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_charitablededuction$year), max(placebo_gaps_data_long_charitablededuction$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 5 times higher than Arizona's, resulting\nin 24 placebo states. Associated p-value is approximately 0.125.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe5_charitablededuction

ggsave(
  filename = "CharitableDeduction_PlaceboPlot_MSPE5_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe5_charitablededuction,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)
ratio_2mspecontrol_charitablededuction <- mspe.test(placebos_charitablededuction, discard.extreme = TRUE, mspe.limit = 2)
ratio_2mspecontrol_charitablededuction$p.val
## [1] 0.15
placebo_gaps_data_long_charitablededuction %>%
  summarize(n_mspe2 = ((sum(ifelse(pre_mspe <= 2 * pre_mspe[unit == "Y1"], 1, 0)))/11)-1)
## # A tibble: 1 × 1
##   n_mspe2
##     <dbl>
## 1      19
placebo_plot_mspe2_charitablededuction <- ggplot(data = filter(placebo_gaps_data_long_charitablededuction, pre_mspe <= 2 * pre_mspe[unit == "Y1"]),
       aes(year, gap, group = unit,
           colour   = type,
           linewidth = type,
           alpha     = type)) +
  geom_line() +
  scale_colour_manual(values = c(Treated = "black", Placebo = "grey70")) +
  scale_linewidth_manual(values = c(Treated = 0.9,   Placebo = 0.5)) +
  scale_alpha_manual(values = c(Treated = 1,     Placebo = 0.60)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +
  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +
  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = seq(min(placebo_gaps_data_long_charitablededuction$year), max(placebo_gaps_data_long_charitablededuction$year), by = 1)) +
  labs(x = "\nYear\n",
       y = "\nGap in Median Contributions\n",
       caption = "Note: Discards states with pre-treatment MSPE 2 times higher than Arizona's,\nresulting in 20 placebo states. Associated p-value is approximately 0.150.\n") +
  theme_classic(base_family = "Times New Roman") +
  theme(legend.position = "none",
        panel.border = element_rect(color = "black", fill = NA, size = 0.8),
        plot.caption = element_text(hjust = 0),
        plot.margin = unit(c(1,3,0,0), "lines"))

placebo_plot_mspe2_charitablededuction

ggsave(
  filename = "CharitableDeduction_PlaceboPlot_MSPE2_AZUnivCharitableDeductionAnalysis.png",
  plot = placebo_plot_mspe2_charitablededuction,
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300)

Leave-One-Out (LOO) Tests

LOO 1: CA

Prepare Data (LOO CA)

ds_state_slim_looca <- ds_state_slim %>% filter(state != "CA")


ds_state_slim_looca <- ds_state_slim_looca %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CT" ~ 4,
             state == "FL" ~ 5,
             state == "HI" ~ 6,
             state == "IA" ~ 7,
             state == "ID" ~ 8,
             state == "IL" ~ 9,
             state == "IN" ~ 10,
             state == "KS" ~ 11,
             state == "KY" ~ 12,
             state == "LA" ~ 13,
             state == "MD" ~ 14,
             state == "ME" ~ 15,
             state == "MI" ~ 16,
             state == "MO" ~ 17,
             state == "MS" ~ 18,
             state == "MT" ~ 19,
             state == "NC" ~ 20,
             state == "ND" ~ 21,
             state == "NE" ~ 22,
             state == "NH" ~ 23,
             state == "NJ" ~ 24,
             state == "NM" ~ 25,
             state == "NV" ~ 26,
             state == "NY" ~ 27,
             state == "OH" ~ 28,
             state == "OK" ~ 29,
             state == "OR" ~ 30,
             state == "PA" ~ 31,
             state == "RI" ~ 32,
             state == "SC" ~ 33,
             state == "SD" ~ 34,
             state == "TN" ~ 35,
             state == "TX" ~ 36,
             state == "UT" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))




data_prep_out_looca <- dataprep(
  foo = ds_state_slim_looca,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_looca$state_id[ds_state_slim_looca$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO CA)

synth_out_looca <- synth(
  data.prep.obj = data_prep_out_looca)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20983093 
## 
## solution.v:
##  0.007521264 0.03041306 0.0002002758 0.03492208 0.1713188 0.007556742 0.2348354 0.001179079 0.06534734 0.09244026 0.07954452 0.1622714 0.08181029 0.00450698 0.02613257 
## 
## solution.w:
##  2.16e-08 1.01e-08 1.265e-07 1.8105e-06 0.3860326 7.08e-08 0.08418824 0.0002656284 2.98e-08 1.4451e-06 2.64e-08 1.806e-07 7.67e-08 3.189e-07 1.7e-08 5.36e-08 1.23354e-05 3.67e-08 4.92e-08 1.19e-08 1.024e-07 9.7e-09 1.661e-06 4.666e-07 1.18e-08 0.171756 4.51e-08 1.257e-07 5.79e-08 4.23e-08 1.38e-08 2.00314e-05 5.04e-08 6.65e-08 2.31e-06 0.3577157 2.141e-07 2.31e-08 1.9e-09 1.38e-08 7e-10 5e-10
synth_AZ_median_contributions_looca <- as.numeric(data_prep_out_looca$Y0 %*% synth_out_looca$solution.w)

Hypothesis Testing (LOO CA)

placebos_looca <- generate.placebos(
  dataprep.out = data_prep_out_looca,
  synth.out = synth_out_looca,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3209388 
## 
## solution.v:
##  1.341e-07 0.1195416 0.04170697 0.02622305 0.006160259 0.1032956 0.002466459 1.51293e-05 7.717e-07 0.0001359528 1.88305e-05 0.4889278 0.02784596 0.06452276 0.1191387 
## 
## solution.w:
##  0.001542127 2.84231e-05 4.27786e-05 4.9552e-06 0.3114301 2.97687e-05 5.2665e-06 0.353654 2.2776e-06 2.77565e-05 7.82876e-05 3.2504e-06 6.6323e-06 6.3654e-06 2.76715e-05 6.4599e-06 4.6381e-06 3.64099e-05 6.683e-07 1.686e-06 7.81155e-05 2.95e-08 2.54181e-05 2.326e-06 6.9468e-06 0.000384866 5.8668e-05 0.0008534087 1.0333e-05 9.7212e-06 6.00581e-05 3.4547e-06 2.02968e-05 4.30849e-05 8.6037e-06 0.01737723 8.3034e-06 0.0005056234 0.3135953 9e-10 8.5991e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3057093 
## 
## solution.v:
##  0.001110493 0.1570875 0.1008979 2.29772e-05 0.0008835506 0.007410069 0.0005901293 0.001117169 4.7242e-06 5.8573e-06 0.002276675 0.2246295 0.103991 0.01434688 0.3856254 
## 
## solution.w:
##  0.0002671404 5.6465e-06 8.7898e-06 1.7593e-06 7.92125e-05 3.8292e-06 0.09991431 7.17435e-05 0.587196 3.68084e-05 6.4239e-06 3.05904e-05 3.2793e-06 1.50018e-05 2.20653e-05 2.09871e-05 5.2404e-06 1.39067e-05 0.1240364 1.8233e-05 7.63e-06 0.139189 4.5243e-06 7.1117e-06 1.6436e-05 1.89184e-05 0.002923181 4.8839e-06 0.02326654 6.4979e-06 4.8777e-06 9.4078e-06 1.24742e-05 4.0895e-05 2.2892e-06 0.003456229 3.4411e-06 5.6962e-06 1.39236e-05 0.01924451 4.126e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5706573 
## 
## solution.v:
##  0.1414097 0.0007396826 0.07069516 0.06197835 0.002776441 0.07459201 0.005924778 0.1140873 0.02066386 0.001373245 0.02957724 0.2527467 0.04461915 0.1358842 0.04293215 
## 
## solution.w:
##  7.9956e-05 0.0001423126 0.0001153174 1.238e-07 0.09027118 0.000177983 0.0002296832 0.0002075415 0.01771948 9.04032e-05 0.00010499 0.0001775277 0.05848459 0.0001766417 0.0002512116 0.0002774828 6.94623e-05 9.86927e-05 0.02245368 0.04881962 0.5460191 0.0002574302 3.67537e-05 0.0001088943 0.0203732 0.0002193335 9.07686e-05 0.0008466084 0.0008025366 0.009992037 0.0001476462 0.0001164743 4.40243e-05 7.05907e-05 0.1796117 2.957e-07 0.0003349311 0.00014943 0.0004640339 0.0003172444 4.91262e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3612632 
## 
## solution.v:
##  0.07417124 0.1206731 0.0001584522 0.05848568 0.000164603 0.02547197 0.02399472 0.01966903 0.20423 0.0003386411 0.06910533 0.3048821 0.01653737 0.0475392 0.03457857 
## 
## solution.w:
##  1.5234e-06 3.6966e-06 1.1966e-06 2.01e-08 1.0076e-06 0.1084324 2.5945e-06 3.7284e-06 9.55e-07 9.967e-07 5.1e-07 0.0003883654 4.521e-07 0.2404346 0.0005790279 2.098e-06 7.386e-07 6.756e-07 0.06469851 8.895e-07 7.985e-07 0.02276343 5.014e-07 3.2e-09 0.1849224 1.268e-06 4.6423e-05 0.03457305 1.8808e-06 4.424e-07 4.273e-07 8.358e-07 0.07028783 0.2728357 2.711e-07 2.7568e-06 3.047e-07 2.4847e-06 2.458e-06 2.5089e-06 1.867e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16834237 
## 
## solution.v:
##  0.003217405 0.0001982243 0.006667374 0.1636189 1.534e-07 0.0004525784 0.01015417 0.04456831 1.0825e-05 0.08589212 7.671e-07 0.01603519 0.06298281 0.4657064 0.1404948 
## 
## solution.w:
##  1.4996e-06 1.4054e-06 3.736e-06 3.6563e-06 1.4903e-06 3.0815e-06 7.9136e-06 4.8465e-06 2.0265e-06 1.8814e-06 4.9519e-06 2.7248e-06 1.42e-08 3.344e-06 4.2932e-06 1.8177e-06 3.1361e-06 3.7144e-06 4.5474e-06 2.1494e-06 1.9735e-06 1.1158e-06 2.5683e-06 4.1566e-06 0.001854284 2.7597e-06 4.3477e-06 2.9187e-06 2.3144e-06 6.1827e-06 2.4554e-06 0.09195094 5.7132e-06 4.3165e-06 0.1551822 2.0025e-06 0.03487459 5.7113e-06 1.9427e-06 1.8809e-06 0.7160234 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45057584 
## 
## solution.v:
##  3.03841e-05 3.8492e-06 0.0130753 0.001005099 0.006247796 0.004953097 5.92743e-05 0.01780197 0.04710473 0.01023608 0.05526241 0.2351759 0.4395424 0.09334848 0.07615328 
## 
## solution.w:
##  9.3e-09 4.24e-08 5.24e-08 4.8e-09 3e-10 6.4e-09 7.1e-09 8.8e-09 2.2463e-06 9.95e-08 1.69e-08 5.38e-08 3.33e-08 1.7e-08 1.14e-08 1.41e-08 6.6e-09 7.9e-09 1.054e-07 1.298e-07 2.1692e-06 0.9999935 9.3e-09 1.5e-09 3.5e-09 3.02e-08 3.7e-09 6.1e-09 1.429e-07 3.542e-07 7e-09 5.93e-08 4.2e-09 3.4e-09 4e-10 1.39e-08 8.5e-09 2.8e-09 4.039e-07 3.646e-07 7e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 37435337 
## 
## solution.v:
##  0.06003047 0.06567171 0.02549513 0.01964789 0.1593388 2.50008e-05 0.01176837 0.1095375 0.1703927 0.01084594 0.04759041 0.08727083 0.03105707 0.1919716 0.00935648 
## 
## solution.w:
##  1.42e-08 1e-10 9.8e-09 1.228e-07 0 6.4e-09 4.18e-08 9.2e-09 1.31e-08 1.04e-08 1.3e-08 1.44e-08 2.88e-08 5.8e-09 1.43e-08 4.44e-08 2.18e-08 0.2818632 9.1e-09 7.5e-09 3.3e-09 1.39e-08 1.16e-08 5.25e-08 7.2e-09 6.1e-09 3.36e-08 0.2812427 5.8e-09 6.8e-09 0.1496043 1.09e-08 1.485e-07 3.332e-07 0.2329927 1.49e-08 1.26e-08 2.33e-08 3.9e-09 4.7e-09 0.05429604 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22457066 
## 
## solution.v:
##  0.0378499 0.07405793 0.00537071 0.003113467 0.03979726 0.07218743 2.13607e-05 0.08104301 0.006183474 0.08121459 0.137309 0.1416937 0.08880271 0.08177686 0.1495786 
## 
## solution.w:
##  3.4028e-06 3.8089e-06 9.3111e-06 6.9298e-06 0.1828471 4.4018e-06 1.508e-06 1.68405e-05 0.04754531 3.9297e-06 5.1831e-06 0.1620581 1.52513e-05 4.1572e-06 1.26439e-05 3.72411e-05 6.582e-06 1.94017e-05 0.002035515 7.2874e-06 2.9284e-06 5.0868e-06 2.6076e-06 8.55336e-05 0.04150261 6.1665e-06 1.85918e-05 4.6012e-06 0.1622747 0.06037794 4.2845e-06 0.0003655894 4.7404e-06 0.3189535 2.7e-09 9.9095e-06 2.5567e-06 4.9007e-06 4.5343e-06 6.1246e-06 0.02171927 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2360876 
## 
## solution.v:
##  0.08643564 0.07801076 0.01165307 0.003757977 0.07530641 0.0274759 0.002833775 0.06241689 0.02192908 0.008466833 0.04611938 0.192234 0.1814107 0.1453113 0.05663823 
## 
## solution.w:
##  0.04043688 0.001405832 3.99848e-05 3.61936e-05 2.50268e-05 7.31971e-05 1.66465e-05 5.56255e-05 5.89911e-05 6.99875e-05 4.3516e-05 0.0001335524 2.54517e-05 0.3198361 0.3048841 3.80442e-05 8.56611e-05 5.83273e-05 0.000167788 1.5865e-06 4.3149e-05 3.56726e-05 3.47534e-05 0.1525004 0.0001549224 0.0001245459 0.1190897 4.23675e-05 4.56449e-05 2.73177e-05 2.83677e-05 0.0002155216 0.01412582 5.49942e-05 5.98779e-05 0.008523077 3.27797e-05 3.12e-07 0.0001707203 0.003179029 0.03401854 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 75225240 
## 
## solution.v:
##  0.002081704 0.1328181 0.09025152 0.02353032 0.02394734 0.004977845 0.1085702 0.02643458 0.03932438 0.1098052 0.09715638 0.09497264 0.08888775 0.07329173 0.08395037 
## 
## solution.w:
##  7.69e-08 2.612e-07 6.912e-07 2.373e-07 2.873e-07 0.05748635 7.1e-08 0.0007408034 2.206e-07 3.891e-07 2.419e-07 1.8008e-06 2.508e-07 2.569e-07 3.961e-07 0.4744226 1.522e-07 1.642e-07 9.2361e-06 0.4054195 2.817e-07 0.004294275 2.245e-07 2.543e-07 1.44067e-05 2.241e-07 1.793e-07 1.016e-07 1.3812e-06 0.05755862 2e-10 4.36165e-05 1.719e-07 1.683e-07 2.013e-07 2.888e-07 4.317e-07 1.209e-07 1.829e-07 8.197e-07 3.86e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2706958 
## 
## solution.v:
##  0.1586271 0.01121411 0.008517844 0.02397975 0.004347954 0.1449941 0.0001703499 0.005607994 0.0001097694 8.01321e-05 0.005665028 0.08047459 0.2483434 0.1223296 0.1855383 
## 
## solution.w:
##  1.14525e-05 0.1366123 2.9482e-06 1.7988e-06 8.769e-07 0.4089715 2.715e-07 1.3541e-06 2.1939e-06 5.4465e-06 0.1693568 1.9302e-06 8.2353e-06 3.0415e-06 3.2335e-06 8.33162e-05 4.0792e-06 2.6717e-06 0.2033982 7.8885e-06 5.8326e-06 8.866e-07 5.8492e-06 2.2767e-06 5.845e-07 1.5035e-06 1.59e-08 1.9959e-06 0.03542861 1.10832e-05 1.7916e-06 1.58025e-05 2.2588e-06 1.661e-07 4.224e-07 1.0105e-06 1.416e-06 1.0019e-06 3.32098e-05 0.004786162 0.04121857 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21958570 
## 
## solution.v:
##  0.1047619 0.0006284771 0.02087796 3.878e-07 0.02920368 0.003130627 0.002926773 0.09117474 0.006155356 0.01651952 0.006038246 0.03930043 0.2398742 0.2689537 0.170454 
## 
## solution.w:
##  0.001913251 8.50273e-05 2.54543e-05 2.49207e-05 1.4505e-06 0.0002302263 0.03893468 1.16558e-05 1.69295e-05 0.0001120273 0.0003878841 1.46881e-05 1.7148e-05 0.3326994 0.02391872 8.42175e-05 1.69843e-05 0.0001053594 1.65416e-05 6.43519e-05 2.93943e-05 7.15369e-05 0.000215963 3.33996e-05 6.0557e-06 0.0001156645 2.23375e-05 2.88764e-05 1.31187e-05 1.23513e-05 0.0009221306 0.3281819 0.1226606 2.89989e-05 0.1370066 2.60742e-05 5.03152e-05 7.929e-07 3.91283e-05 0.01185206 1.8304e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29997933 
## 
## solution.v:
##  0.06675219 0.0001167008 0.1758816 0.01285421 0.06033278 0.08624744 0.05353708 0.04625654 0.0004838733 0.09487929 0.04709613 0.04553556 0.1146285 0.1146329 0.08076516 
## 
## solution.w:
##  2.246e-07 3.17e-07 4.979e-07 3.79e-07 2.146e-07 1.062e-07 0.04272997 4.262e-07 3.45e-07 1.421e-07 2.705e-07 2.537e-07 0.08253386 7.621e-07 4.097e-07 2.668e-07 0.004846911 5.167e-07 2.22e-08 1.106e-07 1.1447e-06 0 2.142e-07 2.629e-07 0.07080946 5.029e-07 1.822e-07 1.3381e-06 0.1685823 0.0006868436 2.883e-07 6.341e-07 3.83e-07 1.931e-07 2.77e-07 0.5106334 3.246e-07 3.894e-07 2.0623e-06 0.1191637 2.84e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 482662.4 
## 
## solution.v:
##  0.01572698 0.03520568 0.0105109 0.02585891 0.002441271 0.001020966 0.04277263 0.00244304 7.90879e-05 5.255e-07 0.002155411 0.0769675 0.2096908 0.4046834 0.1704429 
## 
## solution.w:
##  3.3148e-06 2.4291e-06 0.01230204 4.144e-06 1.41024e-05 2.77281e-05 1.38415e-05 5.9165e-06 3.7218e-06 0.007525992 3.9353e-06 7.4546e-06 8.8523e-06 3.3923e-06 4.3046e-06 9.73271e-05 0.1253864 4.7535e-06 3.47e-08 2.1224e-05 1.4e-06 0.3269968 2.84024e-05 2.7589e-06 5.3493e-06 6.2432e-06 2.4189e-06 8.3568e-06 8.7397e-06 0.005403759 3.96448e-05 8.3507e-06 3.1848e-06 3.1456e-06 1.01946e-05 1.10692e-05 0.5220028 3.0938e-06 1.01071e-05 3.2732e-06 2.4e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11098679 
## 
## solution.v:
##  0.04058575 0.002166344 0.1200365 0.08332796 0.02881488 0.1096148 0.001942747 0.1393403 0.03706233 0.0002278534 0.03278295 0.114448 0.07972843 0.1514791 0.05844204 
## 
## solution.w:
##  4.96938e-05 2.9519e-06 7.621e-07 0.04479328 8.58e-07 4.7228e-06 5.765e-07 1.6955e-06 0.0001665898 7.459e-07 4.14258e-05 3.1041e-06 0.07425681 6.231e-07 0.3888277 6.327e-07 5.717e-07 1.0549e-06 0.0004347352 1.6685e-06 0.1820493 1.5374e-06 8.404e-07 4.489e-07 1.16703e-05 0.2021378 1.55506e-05 6.681e-07 5.466e-07 2.922e-07 9.009e-07 4.491e-06 2.9405e-06 4.2247e-06 4.891e-07 1.0765e-06 1.5589e-06 0.1071744 1.402e-07 1.05e-08 8.759e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11541772 
## 
## solution.v:
##  2.86016e-05 0.1096693 0.0009421748 0.002616628 0.1133542 0.263725 0.09244184 0.04303978 0.02454268 0.007896722 0.1069463 0.02430455 0.05625758 0.03210517 0.1221294 
## 
## solution.w:
##  3.2174e-06 0.007691843 0.0005279565 0.001285872 1.27233e-05 6.59239e-05 6.46311e-05 7.81961e-05 0.4692209 4.44748e-05 2.70408e-05 0.1573137 1.07276e-05 2.31128e-05 0.07986438 7.5438e-05 7.0497e-06 1.689e-05 0.0003405417 1.3784e-05 3.69179e-05 0.05724208 1.30934e-05 4.1e-09 5.85742e-05 6.304e-07 2.36903e-05 5.23245e-05 0.0001714833 0.01489355 1.42642e-05 1.80572e-05 0.163724 3.63963e-05 1.5084e-05 4.943e-06 1.41505e-05 3.38261e-05 1.62035e-05 0.04693718 5.1625e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 25871004 
## 
## solution.v:
##  0.01980285 9.92963e-05 0.154865 0.1277737 0.006808174 0.03893294 0.05106156 0.05823588 0.1125075 0.07140001 0.004690874 0.009122886 0.001271465 0.1968309 0.1465969 
## 
## solution.w:
##  0.3055631 2.57814e-05 9.7864e-06 0.0005522265 4.6276e-06 1.16376e-05 2.53138e-05 6.88254e-05 1.74007e-05 0.3394567 1.81792e-05 2.20187e-05 4.45135e-05 1.24488e-05 2.8969e-05 3.85601e-05 2.34285e-05 1.40194e-05 3.70619e-05 1.81585e-05 1.12451e-05 0.04773053 3.52414e-05 0.06688136 6.8323e-06 3.10551e-05 9.17309e-05 2.12292e-05 2.90491e-05 8.7161e-06 0.001171974 1.00446e-05 0.07396285 0.0001428953 2.8608e-06 1.54945e-05 3.7458e-06 8.9905e-06 4.08653e-05 0.1637973 3.3183e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 23012885 
## 
## solution.v:
##  0.03034288 0.05228391 0.01096151 3.97493e-05 0.1052166 0.0007002678 3.7464e-06 0.05255401 0.1223936 0.003580955 0.09292251 0.08375144 0.06450062 0.06171241 0.3190358 
## 
## solution.w:
##  4.3951e-06 1.1891e-06 5.244e-07 4.988e-07 2.463e-07 2.1976e-06 4.484e-07 4.132e-07 9.865e-07 5.0392e-06 2.0904e-06 5.203e-07 1.1919e-05 0.3053212 7.998e-07 6.958e-07 1.9881e-06 8.484e-07 0.1446387 0.1222894 1.0532e-06 8.847e-07 1.3892e-06 0.1891801 2.626e-07 1.0395e-06 7.192e-07 4.892e-07 6.623e-07 4.839e-07 1.2048e-06 2.4472e-06 9.97e-07 5.058e-07 1.55e-07 4.8973e-06 1.76e-07 2.582e-07 6.0168e-06 0.001032357 0.2374798 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 558667.5 
## 
## solution.v:
##  0.1490292 0.003155898 0.0001271813 0.1080135 0.09783657 0.08418068 0.004313054 0.02753123 0.03308099 0.04574914 0.0262428 0.1697892 0.05734838 0.1533572 0.04024505 
## 
## solution.w:
##  0.000606625 0.1132725 6.2037e-06 1.06731e-05 1.85835e-05 1.46461e-05 0.2624778 3.1601e-06 0.09727142 3.6205e-06 1.6155e-05 0.0003927114 1.1404e-06 5.2688e-06 1.08174e-05 6.8922e-06 1.1564e-05 5.8252e-06 7.524e-07 1.03122e-05 8.4604e-06 8.2154e-06 7.65003e-05 5.194e-07 1.4368e-06 0.0002627191 1.80769e-05 3.29266e-05 6.1437e-06 0.05255805 0.000402164 4.2506e-06 0.2331064 0.000109558 2.533e-06 0.1233463 2.8393e-06 1.8373e-06 4.65589e-05 1.5966e-06 0.1158561 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 107887468 
## 
## solution.v:
##  0.1660197 0.0004501112 0.04527998 0.004178277 0.1391858 0.01109841 0.09488564 0.08271846 0.001726716 0.002404665 0.1112771 0.1497498 0.02072238 0.005905077 0.1643979 
## 
## solution.w:
##  1.64238e-05 6.2261e-06 5.81581e-05 3.23947e-05 1.8304e-06 0.01877731 6.91155e-05 4.82722e-05 2.63893e-05 0.0001771342 2.34058e-05 3.6585e-05 0.0003774481 0.0004067983 2.52709e-05 3.86087e-05 0.0002148252 0.0002166787 2.79791e-05 0.09795083 2.278e-07 0.3341809 1.38511e-05 1.9081e-05 9.0853e-06 4.93855e-05 2.86333e-05 3.79515e-05 5.28637e-05 2.51216e-05 0.0001514163 0.0001082063 2.11851e-05 2.23486e-05 6.7186e-06 9.39246e-05 2.59831e-05 1.09007e-05 2.99918e-05 0.5465689 1.16867e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 34711441 
## 
## solution.v:
##  0.02158582 0.001110466 0.06645825 0.1541234 0.106475 0.069076 0.02315303 0.03961168 0.1028936 0.01425383 0.1197724 0.09549405 0.09831377 0.03029814 0.05738059 
## 
## solution.w:
##  4.81e-08 1.358e-07 1.464e-07 6.61e-08 2.735e-07 0.5113929 7.42e-08 1.292e-07 1.6854e-06 0.2693359 2.39e-07 3.7046e-06 4e-08 1.804e-07 1.261e-07 2.781e-07 3.408e-07 1.0294e-06 1.698e-07 2.911e-07 5.94e-08 2.2e-09 1.8593e-06 3.292e-07 5e-09 5.064e-07 0.05205208 9.54e-08 6.03e-08 4.32e-08 0.1670451 1.1907e-06 8.68e-08 1.332e-07 5.71e-08 6.97e-08 1.495e-07 7.16e-08 2.073e-07 1.916e-07 0.0001598652 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1018330 
## 
## solution.v:
##  0.005208869 0.07124816 0.0196213 0.003600615 0.01030906 0.01244208 0.01454248 0.005683133 0.001421695 0.01606154 0.001066697 0.4631547 0.1485403 0.09622776 0.1308716 
## 
## solution.w:
##  1.8987e-06 6.2309e-06 0.02663059 5.784e-07 2.296e-07 0.2054487 1.3535e-06 3.933e-07 5.003e-07 4.961e-07 0.0006324015 6.279e-07 1.2669e-06 0.1892826 2.8683e-06 6.047e-07 4.695e-07 9.756e-07 6.827e-07 0.2517377 5.009e-07 0.2710073 7.987e-07 1.822e-07 4.216e-07 1.3436e-06 3.813e-07 1.9709e-06 0.0002885454 1.8743e-05 4.769e-07 6.726e-07 3.8e-07 3.27e-07 8.7e-08 6.199e-07 0.05368109 6.072e-07 0.001222193 2.10179e-05 1.181e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17839557 
## 
## solution.v:
##  0.0001218754 0.02473199 0.0470969 0.0007885877 0.002433844 0.02518499 7.53144e-05 0.02663999 0.006985217 0.000715683 0.1052221 0.3274036 0.000266537 0.2624897 0.1698437 
## 
## solution.w:
##  1.205e-07 3.059e-07 2.334e-07 1.249e-07 6.2e-09 0.8676253 8.77e-08 9.18e-08 4.75e-08 1.141e-07 1.502e-07 8.23e-08 7.21e-08 1.124e-07 5.62e-08 7.99e-08 5.904e-07 2.38e-08 1.148e-07 2.31e-08 2.18e-08 1.393e-07 4.32e-08 6e-09 7.48e-08 1.168e-07 9.72e-08 5.72e-08 7.572e-07 1.896e-07 4.336e-07 5.37e-08 7.28e-08 1.549e-07 2.8e-09 0.1323699 3.82e-08 2.98e-08 5.91e-08 2.77e-08 1.7e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41302304 
## 
## solution.v:
##  0.01230293 1.07973e-05 0.1070907 0.008586468 6.18139e-05 0.07406683 0.1008474 0.1095575 0.0775959 0.06900486 0.03138047 0.1215657 0.252602 0.0001141678 0.03521242 
## 
## solution.w:
##  1.3538e-06 2.919e-07 1.283e-07 7.99e-08 1.203e-07 0.2324002 3.958e-07 5.14e-08 5.45e-08 0 2.6481e-06 9.612e-07 5.14e-08 3.352e-07 1.229e-07 7.16e-08 3.567e-07 0.1141978 1.238e-07 7.73e-08 1.238e-07 0.01382559 2.059e-07 0.4992141 2.21e-08 1.789e-07 6.76e-08 1.436e-07 1.209e-07 1.416e-07 0.02417427 8.54e-08 6.41e-08 7.35e-08 2.82e-08 5.05e-08 0.1135596 7.2e-08 7.823e-07 5.085e-06 0.002613893 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 167784375 
## 
## solution.v:
##  0.002501927 0.01923115 0.05546748 0.01871171 0.006275249 0.0002698578 0.1540886 2.38384e-05 0.004022789 0.209542 0.0862232 0.3079927 0.02457307 0.02076867 0.09030773 
## 
## solution.w:
##  7.57e-08 5.6e-08 4.7e-09 3.46e-08 1.82e-08 3.1e-09 7.07e-08 8.2e-09 9e-10 5.8e-09 1.83e-08 1.4e-09 7e-09 4.6e-09 8.3e-09 4.3e-09 3.5e-09 1.434e-07 2.46e-08 9e-09 1.7e-09 7.6e-09 1.48e-08 0.3037694 5.3e-09 2.6e-09 1.65e-08 4.39e-08 4.7e-09 2.7e-09 1.4e-09 3.2e-09 9.53e-08 5.79e-08 0.6608499 3.7e-09 2.33e-08 4.89e-08 5.7e-09 3.22e-08 0.03537984 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2812946 
## 
## solution.v:
##  0.2447692 0.02276762 0.1175659 0.01245163 0.1283973 0.2609555 0.007905727 0.0359722 0.002677932 0.01530622 0.04565404 0.009576736 0.04788862 0.02653169 0.02157969 
## 
## solution.w:
##  4e-10 5e-10 6e-10 1.1e-09 0.2274283 1e-10 3e-10 8e-10 1e-09 0 3e-10 4e-10 2e-09 4e-10 9e-10 7e-10 3e-10 4e-10 8e-10 3e-10 2e-10 5e-10 4e-10 5e-10 4e-10 5e-10 6e-10 7e-10 4e-10 1e-10 4e-10 5e-10 9e-10 8e-10 0.2832879 0.4892838 1.5e-09 3.2e-09 4e-10 2e-10 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1018730 
## 
## solution.v:
##  0.003590798 0.001428249 0.01432042 0.0003755227 0.001504027 0.1681102 0.03625824 0.006757498 0.1803509 0.08364502 0.01217049 0.1774197 0.05946017 0.1572488 0.09735998 
## 
## solution.w:
##  0.001622905 0.0007839118 2.38158e-05 9.58063e-05 6.2694e-06 0.01929661 5.9441e-05 2.735e-07 0.004944158 8.78645e-05 0.0006462055 0.1760793 6.6215e-05 3.8898e-06 0.3252337 0.001293954 0.0006396735 6.23934e-05 0.0003659407 0.005416144 0.2651556 8.38202e-05 0.0005307569 3.58427e-05 2.04951e-05 7.04634e-05 0.0007881871 4.25033e-05 0.115698 2.17452e-05 0.001646919 0.06308767 0.0002955619 0.0002480775 3.37892e-05 0.002572202 3.64112e-05 4.29099e-05 0.000351435 0.0124842 2.49883e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10865953 
## 
## solution.v:
##  0.05150944 0.04461587 0.1312859 0.110931 0.0002741501 0.03689538 0.06980335 0.05409927 0.0001188019 0.1311613 0.1069811 0.05446145 0.1776747 0.007770088 0.02241818 
## 
## solution.w:
##  0.03679389 5.96e-08 2.77e-08 6.03e-08 2.89e-08 4.53e-08 3.24e-08 6.81e-08 0.2259046 7.84e-08 7.26e-08 1.016e-07 4.02e-08 1.14e-08 9.2e-08 2.29e-07 1.913e-07 6.02e-08 4.71e-08 0.0635677 6.94e-08 2.85e-08 4.03e-08 4.77e-08 3.44077e-05 2.41e-08 6.88e-08 3.6e-08 3.28e-08 1.64e-08 6.88e-08 9.13e-08 0 0.673697 2.26e-08 2.96e-08 2.85e-08 3.02e-08 5.11e-08 4.186e-07 1.226e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 44565284 
## 
## solution.v:
##  0.0006001634 8.6245e-06 0.05159838 0.1081448 0.1726482 0.04094571 0.1047971 0.0143696 0.06790964 0.002519213 0.01165956 0.1525245 0.0778251 0.06100901 0.1334404 
## 
## solution.w:
##  6.18e-07 1.4104e-06 2.88132e-05 1.35885e-05 5.838e-06 7.8795e-06 0.4364364 5.1094e-06 4.0964e-06 2.228e-06 3.1769e-06 4.4993e-06 1.70485e-05 0.02495502 8.0504e-06 3.4011e-06 3.6906e-06 0.0009069113 2.6658e-06 3.735e-07 7.0243e-06 2.4757e-06 5.985e-06 2.76597e-05 1.7001e-06 1.54462e-05 6.5621e-06 3.1363e-06 6.5911e-06 8.2251e-06 1.00352e-05 1.8709e-06 2.258e-06 3.9421e-06 2.01e-08 0.07525619 8.3812e-06 0.3563592 0.1058621 3.877e-07 1.98e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1355738 
## 
## solution.v:
##  0.0003570147 0.00912692 0.03562425 0.1530348 0.1898325 3.93523e-05 0.005903068 0.0004271758 0.0002081717 7.61354e-05 5.6271e-05 0.0302165 0.2376232 0.1676776 0.1697971 
## 
## solution.w:
##  1.39683e-05 0.2659152 7.64216e-05 3.10535e-05 4.35884e-05 2.691e-06 4.73449e-05 0.09084714 2.02615e-05 1.31651e-05 9.19064e-05 6.78977e-05 4.28118e-05 3.40044e-05 3.59775e-05 3.56686e-05 3.17872e-05 1.2239e-05 0.0001258433 0.2055858 5.3841e-06 5.724e-07 0.3731847 2.59467e-05 1.2492e-05 0.0001522487 4.63718e-05 2.24917e-05 2.38041e-05 0.000726558 3.43037e-05 9.42354e-05 2.47748e-05 3.83579e-05 1.73774e-05 1.40665e-05 6.66417e-05 3.4648e-05 1.86616e-05 0.0001779904 0.06220359 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10826125 
## 
## solution.v:
##  0.007178915 0.01496971 0.2108373 0.08547384 8.51123e-05 0.00731392 0.0002657816 2.81807e-05 0.00052292 0.000111237 2.252e-06 0.2808587 0.09540373 0.1872095 0.1097389 
## 
## solution.w:
##  5.6174e-06 8.7825e-06 0.06992948 3.6603e-06 1.1407e-06 0.0001377866 0.05814316 2.4899e-06 3.6498e-06 0.4769969 5.2326e-06 0.01549865 2.2914e-06 2.69e-08 3.4195e-06 5.5208e-06 2.4263e-06 7.068e-07 8.6872e-06 1.0945e-06 3.0025e-06 6.474e-06 0.05822869 0.1415209 7.7e-09 2.9432e-06 5.4006e-06 2.5004e-06 4.6591e-06 5.6017e-06 0.08909619 3.1905e-06 4.9672e-06 3.0985e-06 0.09033251 3.6759e-06 2.4074e-06 3.4426e-06 6.575e-06 2.5287e-06 5.563e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41802469 
## 
## solution.v:
##  0.01907972 0.006071385 0.3240527 0.2131329 0.04021606 0.1115558 0.0009039413 3.9128e-06 0.004307703 6.85e-08 0.06736687 0.08582293 0.008423235 0.01843386 0.1006288 
## 
## solution.w:
##  1.27e-08 1.001e-07 4.764e-07 3.496e-07 3.56e-08 0.000490436 0.3484766 1.025e-07 7.97e-08 1.205e-07 2.009e-07 0.2009219 4.01e-08 1.8752e-06 8.48e-08 1.136e-07 3.48677e-05 3.04e-08 2.174e-07 1.53e-08 0.3026104 1.648e-07 2.5919e-06 3.46e-08 8.4e-09 1.18e-08 4.162e-07 4.3e-08 6.01e-08 1.784e-07 1.914e-07 6.89e-08 1.585e-07 0.1474571 3.44e-08 5.203e-07 5.09e-08 5.56e-08 2.055e-07 1.21e-08 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29981898 
## 
## solution.v:
##  0.1509328 0.01551032 0.002137064 0.1579021 0.3764832 0.085545 0.008997919 0.01644762 0.01252384 0.002171878 0.01192731 0.02796672 0.0527919 0.06501713 0.01364522 
## 
## solution.w:
##  4.096e-06 2.318e-06 3.5254e-06 6.6065e-06 0.1303694 7.352e-06 2.1379e-06 4.282e-07 0.0001663241 0.1166399 4.8069e-06 0.2723337 0.06074628 9.2e-09 2.45007e-05 1.89265e-05 5.1246e-06 3.6627e-06 5.5001e-06 0.3076174 0.04305598 2.372e-06 2.6527e-06 1.3583e-06 4.0344e-06 0.001439386 1.31074e-05 8.0984e-06 2.1729e-06 7.0684e-06 0.0001466585 3.6564e-06 2.90963e-05 7.4322e-06 2.1308e-06 4.5026e-06 9.096e-07 2.9969e-06 6.9936e-06 0.06729747 -2e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12878984 
## 
## solution.v:
##  0.0393645 0.01490186 0.002791136 0.001912277 0.03247592 0.01481832 0.1488495 0.000112513 0.01251103 8.29345e-05 0.2453295 0.0177281 0.2272658 0.03112049 0.210736 
## 
## solution.w:
##  6.93978e-05 3.231e-07 1.6414e-06 0.001674754 2.689e-07 7.613e-07 0.2327982 4.863e-07 3.035e-07 1.1969e-06 2.4714e-06 1.1288e-06 0.07146227 2.45424e-05 1.6147e-06 0.3948429 1.7198e-06 3.6252e-06 0.002142309 1.79e-08 5.583e-07 1.6431e-06 1.81695e-05 1.1879e-06 0.12059 3.5421e-06 6.092e-07 3.928e-07 1.2069e-06 2.0625e-06 2.3511e-05 7.28168e-05 2.4367e-06 1.6948e-06 0.1760315 1.2603e-06 6.4973e-06 7.262e-07 1.2797e-06 0.0002086859 2.636e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7403119 
## 
## solution.v:
##  0.1911899 0.004270418 0.07744418 0.1385241 1.4304e-05 0.08470467 0.1085828 0.00697158 0.0003991684 0.02815783 0.02251385 0.1001483 0.01215332 0.05287257 0.172053 
## 
## solution.w:
##  2.5e-09 0.07127873 3.73e-07 9.43228e-05 4.854e-07 1.467e-07 1.9877e-06 2.585e-06 0 1.0175e-06 7.224e-07 1.39e-07 1.184e-06 1.691e-07 5.423e-07 5.149e-07 2.3572e-06 3.6e-07 3.6996e-06 2.74e-07 1.331e-07 3.961e-07 0.0002130511 5.41e-08 3.3179e-06 0.005706849 2.005e-07 0.6008885 8.266e-07 5.05e-07 2.829e-07 6.912e-07 2.959e-07 0.0006328002 0.002752446 4.42281e-05 5.665e-07 0.318364 2.487e-07 4.163e-07 5.659e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 324066985 
## 
## solution.v:
##  0.005900328 7.85532e-05 0.0009689428 0.0122302 0.04037862 0.01436848 0.1302645 0.01428277 0.1478061 0.1163438 0.1053729 0.0003109184 0.05416429 0.04171427 0.3158152 
## 
## solution.w:
##  6.7e-09 3.9e-09 5.4e-09 6.5e-09 0.4468941 3.2e-09 6.1e-09 5.5e-09 1.97e-08 4.9e-09 3.7e-09 1.38e-08 4.2e-09 4.9e-09 6e-09 1.24e-08 5.7e-09 8.6e-09 1.24e-08 2.3e-09 4.8e-09 2.4e-09 3.1e-09 6.9e-09 0.5531056 8.2e-09 5.3e-09 1.21e-08 8.9e-09 2.4e-09 4.2e-09 1.07e-08 7e-09 2.14e-08 1.16e-08 8.1e-09 6.7e-09 9e-10 3.6e-09 3e-09 1e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6007432 
## 
## solution.v:
##  0.0002188615 0.0885201 0.04162665 0.0002666721 0.001718631 0.002946132 0.2818244 0.1124226 0.01167821 0.113087 0.03888066 0.05966933 0.06866539 0.0004683897 0.178007 
## 
## solution.w:
##  6.64757e-05 0.0001072268 0.0002790952 6.71263e-05 5.91492e-05 0.0002770676 5.29429e-05 0.1116259 8.46964e-05 0.1731603 7.52788e-05 7.81207e-05 0.07882666 0.01178055 5.81156e-05 7.15997e-05 0.004529478 0.0001247866 0.0001470475 3.33406e-05 0.2807769 9.24403e-05 0.08202402 5.85199e-05 3.12963e-05 0.004945641 0.0003032855 9.53595e-05 7.76607e-05 0.009337425 0.0007520983 0.2394205 7.94615e-05 4.7565e-05 0.0001360815 3.34212e-05 4.89397e-05 5.96961e-05 0.0001098226 3.21103e-05 3.28591e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28277325 
## 
## solution.v:
##  0.04381355 0.0009384207 0.03131065 0.08376683 0.007285571 0.02794483 0.01531213 0.2623281 0.002427224 0.02151184 0.08321374 0.02779456 0.06555141 0.3019559 0.0248453 
## 
## solution.w:
##  2.35e-08 2.78e-08 7.45e-08 3.28e-08 0.05953187 4.97e-08 3.35e-08 6.55e-08 3.36e-08 6.87e-08 5.7e-08 6.32e-08 3.89e-08 0.6452104 5.64e-08 3.33e-08 3.25e-08 2.4e-09 4.04e-08 5.31e-08 5.86e-08 1.27e-08 3.27e-08 1.707e-07 5.11e-08 1.247e-07 4.76e-08 2.45e-08 3.96e-08 5.93e-08 1.069e-07 3.89e-08 8.08e-08 1.24e-08 2.53e-08 0.2952559 2.59e-08 7.43e-08 4.02e-08 3.09e-08 2.44e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 24370340 
## 
## solution.v:
##  0.1029606 0.007473874 0.09242797 0.1298793 0.01510202 7.94416e-05 0.02626478 0.03115994 0.00247537 0.001638709 5.4003e-06 0.03040155 0.213606 0.1043861 0.2421389 
## 
## solution.w:
##  9.8449e-06 4.5936e-06 9.046e-07 1.0993e-06 2.357e-07 1.6079e-06 2.5e-09 7.589e-07 0.0008443873 2.485e-07 9.724e-07 2.28221e-05 4.027e-07 2.088e-07 3.9937e-06 1.9719e-06 3.731e-07 3.528e-07 5.1058e-06 5.52e-08 9.519e-07 9.545e-07 3.632e-07 0.1355989 4.037e-07 1.71e-06 6.7081e-06 6.7492e-06 0.1723745 5.922e-07 8.42e-07 1.042e-06 5.256e-07 1.0586e-06 0.263537 0.3064025 4.9051e-06 3.908e-07 1.9339e-06 2.371e-07 0.1211577 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 411041.7 
## 
## solution.v:
##  0.05681789 0.08678573 0.04534896 0.0002409201 0.171062 0.0003496167 0.05446482 0.04260693 0.0001353649 0.0001155736 0.002565523 0.09301397 0.1195266 0.1264923 0.2004737 
## 
## solution.w:
##  0.08292314 9.43489e-05 5.7898e-05 1.9697e-05 1.5275e-05 0.2574531 2.44341e-05 1.84611e-05 0.003046346 1.53541e-05 2.53691e-05 0.0001941533 1.50813e-05 1.19983e-05 0.0005598824 6.54172e-05 1.73445e-05 0.1334301 3.67019e-05 7.87e-08 5.71885e-05 0.1416434 3.6683e-06 0.001679774 7.47518e-05 1.98654e-05 0.001577688 2.97242e-05 0.0005478654 2.11364e-05 4.94556e-05 3.21492e-05 5.06882e-05 1.90002e-05 1.64187e-05 1.74089e-05 3.79931e-05 2.71872e-05 0.0001298235 0.3751707 0.000769915 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 53467411 
## 
## solution.v:
##  0.04467715 0.001817038 0.03658891 0.04395999 0.1735751 0.02526084 0.1312308 0.01538954 0.0005937279 0.1564889 0.01776286 0.1036762 0.05611071 0.06197387 0.1308943 
## 
## solution.w:
##  5.37481e-05 0.5269738 1.5681e-05 2.39514e-05 9.8138e-06 1.20604e-05 2.40928e-05 2.18541e-05 0.0002179385 2.36289e-05 6.5155e-06 0.0001317354 2.87359e-05 1.29817e-05 0.0002988616 0.0001037259 3.41842e-05 4.24105e-05 3.28817e-05 0.3964091 2.77381e-05 3.24e-08 8.6627e-06 3.78928e-05 0.07490841 1.20563e-05 0.0001294194 3.18984e-05 2.722e-05 7.376e-06 1.51609e-05 3.15122e-05 5.46944e-05 3.22485e-05 2.03231e-05 1.76427e-05 1.86247e-05 1.95608e-05 2.60753e-05 9.55121e-05 2.267e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 52712762 
## 
## solution.v:
##  0.01131031 0.009753667 0.01173205 0.02359442 9.0055e-06 0.003130786 0.05854022 0.0696276 0.00122996 0.1801673 0.002437456 0.137626 0.3157115 0.1343187 0.04081101 
## 
## solution.w:
##  7.61e-08 5.94e-08 7.01e-08 9.22e-08 0.8273146 4.23e-08 1.3464e-06 6.65e-08 7.54e-08 4.59e-08 5.56e-08 1.254e-07 7.09e-08 3.37e-08 9.94e-08 7.73e-08 6.59e-08 1.698e-07 1.523e-07 2.34e-08 3.54e-08 4.79e-08 4.46e-08 3.299e-07 0.1046752 8.2e-08 7.4e-08 5.72e-08 5.341e-07 3.27e-08 4.37e-08 1.54e-07 4.89e-08 5.98e-08 7.51e-08 0.06800457 7.77e-08 1.78e-07 8.344e-07 6.48e-08 6.73e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_looca <- mspe.test(placebos_looca, discard.extreme = FALSE)

mspe_test_looca$p.val
## [1] 0.1395349

LOO 2: HI

Prepare Data (LOO HI)

ds_state_slim_loohi <- ds_state_slim %>% filter(state != "HI")


ds_state_slim_loohi <- ds_state_slim_loohi %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "IA" ~ 7,
             state == "ID" ~ 8,
             state == "IL" ~ 9,
             state == "IN" ~ 10,
             state == "KS" ~ 11,
             state == "KY" ~ 12,
             state == "LA" ~ 13,
             state == "MD" ~ 14,
             state == "ME" ~ 15,
             state == "MI" ~ 16,
             state == "MO" ~ 17,
             state == "MS" ~ 18,
             state == "MT" ~ 19,
             state == "NC" ~ 20,
             state == "ND" ~ 21,
             state == "NE" ~ 22,
             state == "NH" ~ 23,
             state == "NJ" ~ 24,
             state == "NM" ~ 25,
             state == "NV" ~ 26,
             state == "NY" ~ 27,
             state == "OH" ~ 28,
             state == "OK" ~ 29,
             state == "OR" ~ 30,
             state == "PA" ~ 31,
             state == "RI" ~ 32,
             state == "SC" ~ 33,
             state == "SD" ~ 34,
             state == "TN" ~ 35,
             state == "TX" ~ 36,
             state == "UT" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))




data_prep_out_loohi <- dataprep(
  foo = ds_state_slim_loohi,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_loohi$state_id[ds_state_slim_loohi$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO HI)

synth_out_loohi <- synth(
  data.prep.obj = data_prep_out_loohi)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 34361077 
## 
## solution.v:
##  0.01405232 0.09237926 0.00540002 0.01685778 0.123411 6.26585e-05 0.003864715 0.002684448 0.01887044 0.05289245 0.03306835 0.1053119 0.3384354 0.1924397 0.000269513 
## 
## solution.w:
##  1.8e-09 2e-09 0.496381 2.11e-08 9.1e-09 3e-09 9.65e-08 5.12e-08 3.5e-09 1.17e-08 3e-09 6.9e-09 7.3e-09 3.633e-07 2.6e-09 4.9e-09 1.24e-08 5.5e-09 1.07e-08 2e-09 3.9e-09 3.7e-09 5.7e-09 5.8e-09 2.8e-09 2.294e-07 4.2e-09 5.3e-09 7.1e-09 1.3e-08 1.424e-07 1e-10 6.7e-09 6.8e-09 8.4e-09 0.5036179 7.4e-09 1.37e-08 5.8e-09 2.2e-09 2e-10 0
synth_AZ_median_contributions_loohi <- as.numeric(data_prep_out_loohi$Y0 %*% synth_out_loohi$solution.w)

Hypothesis Testing (LOO HI)

placebos_loohi <- generate.placebos(
  dataprep.out = data_prep_out_loohi,
  synth.out = synth_out_loohi,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1603555 
## 
## solution.v:
##  0.001937078 0.0585338 0.07317957 0.0009808499 0.02272116 0.05632366 0.001525684 0.004426827 0.001091489 0.01641969 0.0006801494 0.401847 0.2339371 0.0829948 0.04340107 
## 
## solution.w:
##  6.41e-07 9.46e-07 6.368e-07 0.001784906 2.57904e-05 8.4224e-06 3.264e-07 2.219e-07 4.256e-07 0.001075278 1.5161e-06 4.651e-07 1.5956e-06 0.1231402 1.785e-07 4.3058e-06 7.78573e-05 9.597e-07 1.2562e-06 3.0553e-06 2.11e-06 0.302957 2.26017e-05 3.66832e-05 7.09e-08 1.1426e-06 0.03631747 5.34561e-05 3.645e-07 2.307e-07 0.002732048 4.017e-07 0.1180377 5.384e-06 2.691e-07 2.81e-07 1.8062e-06 1.428e-06 1.20572e-05 0.4136859 2.6621e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15907502 
## 
## solution.v:
##  1.1797e-05 0.05410481 0.1881159 4.56854e-05 4.608e-07 0.02750743 6.2254e-05 0.003745031 0.2123425 0.001887944 0.05374644 0.1485636 0.01699045 0.08124161 0.2116342 
## 
## solution.w:
##  0.4084128 1.17047e-05 4.6643e-06 7.0798e-06 1e-10 3.1527e-06 2.43517e-05 3.55166e-05 0.4605033 2.36104e-05 2.05767e-05 9.9461e-06 1.6138e-06 7.6844e-06 2.26881e-05 8.39289e-05 3.774e-06 0.0001781151 1.865e-06 4.88e-08 4.7943e-06 0.1288173 7.2315e-06 4.1879e-06 2.7217e-06 3.20521e-05 7.80181e-05 2.1875e-06 3.76614e-05 1.26098e-05 1.60366e-05 4.22571e-05 5.79175e-05 0.000109822 2.0451e-06 0.001385625 3.6435e-06 5.2065e-06 5.1756e-06 5.0334e-06 1.20752e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2356923 
## 
## solution.v:
##  0.05863822 0.005584102 0.2646969 0.01802193 0.1232526 0.01119704 0.00193185 0.004387175 0.06188504 0.0008377915 0.007291112 0.1130798 0.01761771 0.09381155 0.2177671 
## 
## solution.w:
##  1.7059e-06 8.097e-07 8.1157e-06 5.1642e-06 4.3406e-06 -2e-10 3.0024e-06 1.8084e-06 3.1661e-06 1.5746e-06 3.2843e-06 1.7374e-06 2.77318e-05 1.4141e-06 1.6331e-06 3.3134e-06 2.1816e-06 2.8753e-06 4.816e-07 4.65e-06 1.4375e-06 3.9063e-06 0.002596741 9.951e-07 0.2333933 1.9643e-06 2.6852e-06 0.167518 1.6105e-06 3.5977e-06 0.0002340207 1.5781e-06 2.1367e-06 0.3717368 0.2244018 1.25875e-05 5.6951e-06 2.337e-07 1.1543e-06 6.59e-08 7.485e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9164232 
## 
## solution.v:
##  0.08589632 0.0001437945 0.27036 0.03325799 0.09343341 0.07222723 0.02595688 0.00706069 0.0107246 0.001760922 0.09330198 0.1467465 0.003585298 0.1268382 0.0287062 
## 
## solution.w:
##  0.0001046217 0.000160349 0.06218208 0.0005078515 0.2129425 0.0008173857 0.0009200124 0.0001836397 0.01645698 0.0002676655 0.0003279976 0.0001704572 0.1671264 0.0002586821 0.0003834518 0.0004605316 9.07468e-05 0.0001380868 0.0009158878 0.0004405386 0.2899462 0.03868604 2.61653e-05 0.0001916026 0.03591518 0.0002365562 0.0003077544 1.67527e-05 0.0005830981 0.04244049 0.0002272924 0.0002295084 0.0001287096 0.000319729 0.1058607 9.63577e-05 0.01894125 0.0005328472 0.0001858046 0.0001617804 0.0001103356 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3814078 
## 
## solution.v:
##  0.1113202 0.000325978 0.02331314 0.000565117 0.0002036426 0.1793936 0.06902248 0.01358661 0.09346136 2.04202e-05 0.1567317 0.1773137 0.0351576 0.07521585 0.0643686 
## 
## solution.w:
##  9.728e-07 6.587e-07 0.4653871 2.4448e-06 1.6263e-06 0.06424526 3.8082e-06 3.502e-07 6.504e-07 1.7356e-06 9.163e-07 0.0510824 2.447e-06 9.9834e-06 4e-10 8.288e-07 5.783e-07 6.473e-07 0.1532928 8.898e-07 2.8804e-06 0.08042636 6.85e-07 3.394e-07 0.02758445 1.2338e-06 0 0.0005005849 3.7275e-06 1.3374e-06 1.0996e-06 8.873e-07 0.1542719 0.003162024 8.87e-07 2.548e-07 7.983e-07 1.4306e-06 1.7963e-06 8.14e-07 3.735e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056559 
## 
## solution.v:
##  0.001213396 0.002233463 0.01481813 0.01057423 0.001064741 0.00120135 0.002902149 0.01578088 0.01518905 0.005112282 0.08501622 0.2115143 0.4905941 0.07760668 0.06517907 
## 
## solution.w:
##  7.3e-09 1.69e-08 1.1e-09 8e-09 2e-09 2e-09 2.2e-09 3.4e-09 3.55e-07 2.02e-08 5.2e-09 1.5e-08 4.5e-09 6e-09 4e-09 5.2e-09 2e-09 2.6e-09 7.8e-09 4.84e-08 3.8e-08 0.9999993 3.5e-09 6e-10 1.1e-09 8.9e-09 1.5e-09 2.2e-09 1.26e-08 1.96e-08 2.8e-09 1.12e-08 1.7e-09 1.4e-09 1e-10 7.9e-09 1.9e-09 1.1e-09 6.58e-08 3.65e-08 1e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 39271554 
## 
## solution.v:
##  0.02209421 0.1074105 0.08438902 0.05112964 0.01820696 0.08032208 0.0004086994 0.0528567 0.07155944 0.05767111 0.06788988 0.09377204 0.04881262 0.1717596 0.07171747 
## 
## solution.w:
##  5.7e-08 8.582e-07 0.003276082 1.32732e-05 4.3388e-06 7.436e-07 1.02014e-05 1.1878e-06 2.2255e-06 1.1547e-06 5.5564e-06 3.0543e-06 0.003163982 1.204e-06 1.8872e-06 4.4242e-06 1.2496e-06 2.06783e-05 1.1258e-06 6.846e-07 2.9434e-06 2.8362e-06 2.0883e-06 1.1025e-06 3.4165e-06 2.0975e-06 1.3174e-06 0.3258714 7.2526e-06 3.75636e-05 0.3287382 2.4863e-06 2.1122e-06 4.3064e-06 0.2187335 1.7496e-06 9.5648e-06 8.4955e-06 1.0948e-06 8.625e-07 0.1200516 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 35442102 
## 
## solution.v:
##  0.1253732 0.0002258345 0.02261508 0.06664886 0.04624332 0.03926019 0.007996844 0.07095665 0.08071019 0.1496554 0.1137576 0.04355945 0.06250661 0.08513784 0.08535297 
## 
## solution.w:
##  4.758e-07 6.074e-07 9.4303e-06 1.1118e-06 4.309e-07 6.749e-07 0.0347229 2.3199e-06 3.5729e-06 6.385e-07 1.12207e-05 1.37917e-05 2.1347e-06 1.1935e-06 2.9157e-06 0.03116093 1.3224e-06 1.5539e-06 0.2396376 1.0366e-06 4.759e-07 6.841e-07 1.2533e-06 0.06701121 0.3535999 2.587e-06 8.633e-07 1.5028e-06 3.62673e-05 0.03368501 2.2201e-06 0.005635544 3.4e-09 0.2344404 1.0712e-06 8.738e-07 3.501e-07 1.7434e-06 9.709e-07 7.842e-07 3.913e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 868411.2 
## 
## solution.v:
##  0.01843705 0.005385281 0.008407064 0.002418462 0.04263327 0.0165523 0.004336733 0.004734864 0.09120856 0.01542768 0.03102284 0.2951752 0.05962314 0.291621 0.1130166 
## 
## solution.w:
##  7.35e-08 0.004700887 9.5296e-06 1.672e-05 4.5834e-06 3.66468e-05 2.0059e-06 6.69233e-05 4.61755e-05 1.12142e-05 1.22674e-05 5.28119e-05 7.2432e-06 0.0002954144 0.7448044 5.969e-06 3.4475e-05 8.6018e-06 7.47e-08 0.0008686826 1.34239e-05 2.5332e-06 2.33518e-05 0.01431921 0.002902381 0.0002016232 1.30478e-05 9.5527e-06 1.70554e-05 2.69572e-05 2.4822e-06 0.003246517 5.059e-07 7.1426e-06 8.237e-07 0.08637395 8.9279e-06 0.009589553 0.0002528085 0.0002544309 0.131749 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 74214123 
## 
## solution.v:
##  0.01581127 0.3688747 0.01713039 0.007183405 0.007541884 0.1506656 0.1430156 0.04857094 0.007233897 0.06585383 0.004155053 0.03175769 0.01297861 0.08505015 0.03417702 
## 
## solution.w:
##  1.081e-07 1.859e-07 1.973e-07 4.26082e-05 1.458e-07 0.07287712 1.171e-07 3.39e-07 1.06e-07 2.002e-07 2.3e-07 3.011e-07 1.4806e-06 1.439e-07 1.432e-07 0.382398 2.029e-07 1.701e-07 8.42e-08 0.3480577 4.252e-07 3.027e-07 4.282e-07 1.323e-07 1.057e-07 2.226e-07 1.144e-07 1.816e-07 4.023e-07 0.08555143 7.39e-08 1.582e-07 1.012e-07 1.303e-07 7.7e-09 0.1110651 5.67e-07 1.463e-07 1.443e-07 8.83e-08 1.038e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1793684 
## 
## solution.v:
##  0.002868277 0.01762608 0.004919544 0.07250748 8.623e-06 0.05164454 0.0008271164 0.0002082387 0.002277484 8.97527e-05 0.06810596 0.2426317 0.2025593 0.1994308 0.1342951 
## 
## solution.w:
##  0.0001431827 0.001069616 8.0102e-06 2.9775e-06 1.25987e-05 0.5426848 0.06082541 2.33019e-05 1.48587e-05 9.189e-07 0.04964395 2.57834e-05 3e-10 4.65603e-05 1.00736e-05 2.6295e-06 3.8739e-06 3.55873e-05 0.1206807 8.6318e-06 4.6438e-06 2.52e-08 2.1502e-06 1.1738e-06 2.695e-06 0.001551099 3.84924e-05 9.2463e-06 0.08533352 8.75e-08 1.28708e-05 0.05749838 7.0647e-06 6.775e-05 8.785e-07 1.58475e-05 1.9139e-06 1.1328e-05 1.50037e-05 2.5962e-06 0.08017978 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 46055470 
## 
## solution.v:
##  0.09720483 0.04980877 0.06560635 0.01911765 0.1223266 0.009632705 0.02628897 0.06080419 0.00594634 0.02170245 0.008402793 0.0278979 0.1652377 0.1000177 0.2200051 
## 
## solution.w:
##  6.567e-06 2.187e-06 0.0006501208 3.9198e-06 4.8184e-06 0.0001415594 9.1e-09 9.8316e-06 2.4285e-06 2.54809e-05 2.15156e-05 1.3179e-06 1.5649e-06 6.3508e-06 0.2545224 3.1584e-06 5.2e-07 0.04290857 1.0071e-06 1.16823e-05 2.4164e-06 2.9931e-06 0.001958139 5.292e-07 5.3654e-06 0.4388894 1.31175e-05 1.0071e-06 2.7061e-06 7.39048e-05 0.06545742 0.001246841 2.74787e-05 0.0003754965 0.1935823 1.6631e-06 3.1589e-06 2.82852e-05 1.7394e-06 5.912e-07 4.736e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19952380 
## 
## solution.v:
##  0.1433874 0.0002856657 0.2400621 0.004732866 0.09208227 0.08031669 0.001939643 9.35647e-05 0.008434412 0.06668331 0.02742078 0.08929105 0.07581094 0.1094382 0.06002114 
## 
## solution.w:
##  3.825e-07 8.654e-07 6.498e-07 2.978e-07 1.7049e-06 1.819e-07 0.1695401 1.3437e-06 8.97e-07 2.741e-07 3.563e-07 4.206e-07 2.7e-09 1.9317e-06 1.641e-06 4.57e-07 1.665e-07 1.2827e-06 0.0001912105 1.828e-07 1.634e-07 -1e-10 1.582e-07 5.696e-07 2.11703e-05 6.768e-07 5.025e-07 6.608e-07 0.3367767 6.85e-08 4.004e-07 7.853e-07 2.6945e-06 5.094e-07 1.0019e-06 0.4934373 2.534e-07 6.602e-07 2.876e-07 1.10417e-05 2.14e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2750304 
## 
## solution.v:
##  0.2628575 0.1341371 0.0003474529 0.02434907 0.04780742 0.0005046234 0.1353001 0.05144406 0.01318793 9.40327e-05 0.0006627478 0.1015066 0.01004771 0.0851594 0.1325943 
## 
## solution.w:
##  5.56e-08 8.82e-08 1.44872e-05 2.5125e-06 8.677e-07 1e-10 6.2981e-05 7.4218e-06 2.16e-08 0.1194456 1.083e-07 3.436e-07 9.93e-07 1.206e-07 1.541e-07 9.7846e-06 1.1614e-06 7.854e-07 2.582e-07 2.47e-08 1.9e-09 0.268679 3.56e-07 3.023e-07 0.06777093 1.656e-07 1.623e-07 1.2095e-06 6.264e-07 0.000404337 1.74442e-05 3.465e-07 2.889e-07 6.664e-07 0.0001152537 6.826e-07 0.5434596 4.221e-07 1.126e-07 7.45e-08 2.323e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 14399626 
## 
## solution.v:
##  0.1642444 0.001391453 0.00529566 0.08590937 0.001999262 0.0461025 0.03423226 0.06013304 0.05547894 0.05272515 0.05225962 0.04759837 0.067868 0.239198 0.085564 
## 
## solution.w:
##  0.001800714 0.0001031583 0.001084961 1.40237e-05 0.2468941 0.02089015 1.67898e-05 1.5703e-06 0.0001040492 2.13049e-05 7.61663e-05 0.2385139 0.1712191 3.9562e-06 5.44604e-05 2.86895e-05 4.11341e-05 2.19143e-05 5.723e-07 3.6949e-05 0.07780175 0.0003777502 0.006554645 4.80224e-05 0.02102688 0.1949165 2.4775e-05 0.008117617 5.82e-08 1.8786e-06 0.0001292116 1.587e-06 1.01075e-05 1.61292e-05 0.0002186568 0.0002669346 0.0001564446 0.007320914 0.001629712 0.0004378242 1.50133e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8445604 
## 
## solution.v:
##  5.06485e-05 0.007538704 0.0003919611 0.1037934 0.06364409 0.07500474 4.43e-07 0.09079483 0.140596 0.01123654 1.4423e-06 0.05668095 0.1531387 0.01910432 0.2780233 
## 
## solution.w:
##  0.006639985 0.001772026 0.0001389266 0.01586651 0.0002243304 0.002529739 0.0002187332 0.0001267945 0.1854211 0.0002112291 0.001120332 0.05791571 0.0002269583 0.0002626044 0.238311 0.0002543491 0.0001196165 0.0004751376 0.001040049 0.0004195852 0.02110906 0.001394223 0.0001193516 1.50507e-05 0.0001233985 0.003118796 0.0002414636 0.0002433649 0.0008907695 0.05584408 0.0003940941 0.0004501175 0.3146341 4.01957e-05 -2e-10 0.0004487317 0.0001709819 0.0003499132 0.001829383 0.08525817 2.99731e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18393069 
## 
## solution.v:
##  0.06835494 0.005667383 0.05596176 0.1130061 0.0007270253 0.07544946 0.1300569 0.0689071 0.04044648 0.007395517 0.01286948 0.03263802 0.1037481 0.220519 0.06425271 
## 
## solution.w:
##  0.2763565 0.0003034793 2.64226e-05 2.0248e-05 6.22539e-05 2.4e-09 4.98327e-05 4.65184e-05 3.72145e-05 0.2252212 2.01371e-05 2.51187e-05 3.01097e-05 2.19317e-05 1.83277e-05 0.0001584383 4.68938e-05 5.52064e-05 0.0001613089 2.983e-07 1.5736e-05 0.002621897 1.9055e-05 0.00027557 8.4155e-06 2.93264e-05 0.1753044 2.58619e-05 4.47287e-05 2.08832e-05 0.003346603 1.13503e-05 0.004287523 0.0001264922 9.2728e-06 4.62419e-05 7.9205e-06 1.42987e-05 2.68503e-05 0.3110793 1.69437e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 23774105 
## 
## solution.v:
##  0.05174317 0.07486342 0.01917391 0.06941138 0.1089266 0.002919332 7.06923e-05 0.1881641 0.1693737 0.0004481388 8.08944e-05 0.02635672 0.04343857 0.1157246 0.1293047 
## 
## solution.w:
##  9.5e-09 2e-09 2.5e-09 9.7e-09 3.1e-09 1.58e-08 9.5e-09 4.1e-09 2.18e-08 9.9e-09 7.5e-09 6.5e-09 1.749e-07 0.3416315 2.03e-08 6.6e-09 4.3e-09 4.8e-09 0.04240398 0.1304837 1.44e-08 1e-09 2.24e-08 0.1218568 3.6e-09 1.14e-08 4.2e-09 1.12e-07 2e-09 2.2e-09 7.2e-09 1.63e-08 2e-09 9e-10 1.25e-08 4.72e-08 8.1e-09 1.38e-08 1.332e-07 0.08511605 0.2785072 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 249553.4 
## 
## solution.v:
##  0.1097305 0.0001792364 5.93201e-05 0.01856095 0.04592887 0.0003546807 0.00777556 4.69573e-05 0.007507992 0.2494605 3.20887e-05 0.313782 0.1954609 0.03813794 0.01298253 
## 
## solution.w:
##  6.34417e-05 0.1025597 7.06172e-05 1.975e-05 3.65247e-05 2.62233e-05 0.3091899 7.03208e-05 0.1902277 0.03277455 2.61257e-05 6.13147e-05 3.27283e-05 2.06567e-05 1.95553e-05 6.17008e-05 3.998e-07 0.0001136745 1.07e-08 3.08364e-05 1.28222e-05 2.61586e-05 6.42919e-05 0.01079248 2.81251e-05 2.03681e-05 4.82597e-05 4.45522e-05 1.26178e-05 0.03039503 5.0531e-05 5.139e-07 0.1488645 0.0001538755 6.73605e-05 0.07571346 1.6153e-05 4.92502e-05 1.74813e-05 1.0736e-05 0.09820582 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 69813917 
## 
## solution.v:
##  0.008243328 0.0001752825 0.1346806 0.001003168 0.08328963 0.1111819 0.0001792936 0.08101313 0.07468788 0.103201 0.000283814 0.2578257 0.003515773 0.03008406 0.1106354 
## 
## solution.w:
##  1.7056e-06 1.2507e-06 4.745e-07 4.5192e-06 7.962e-07 0.1742781 1.1883e-06 8.006e-07 1.2528e-06 1.23e-06 5.0365e-06 2.8023e-06 7.232e-07 0.008244705 1.2475e-06 1.5322e-06 1.5441e-06 1.5057e-06 1.0811e-06 5.4271e-06 0.1901708 2.4e-09 8.764e-07 2.884e-07 3.187e-07 4.0522e-06 1.3906e-06 8.69e-07 0.5236641 1.90793e-05 1.9158e-06 1.13007e-05 7.908e-07 8.629e-07 1.765e-07 6.653e-07 1.2509e-06 4.743e-07 2.28774e-05 0.1035395 1.5141e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12793153 
## 
## solution.v:
##  0.003107811 0.0001465479 0.02373712 3.3566e-05 0.05363761 1.1369e-06 0.02075425 0.128249 0.2140991 0.04489101 0.001246647 0.0981269 0.268873 0.02761905 0.1154772 
## 
## solution.w:
##  3.779e-07 4.99e-08 1e-08 3.82e-08 1.2e-08 0.4074847 9.5e-09 1.98e-08 3.852e-07 3.9e-09 5.3e-08 8.63e-08 2.18e-08 2.83e-08 2.61e-08 6.43e-08 3.84e-08 2.85e-08 4.42e-08 6.44e-08 1.84e-08 1.16e-08 2.28e-08 2.1e-09 2e-09 1.091e-07 2.311e-07 1.12e-08 2.49e-08 1.8e-08 0 3.797e-07 2.63e-08 3.04e-08 6.9e-09 0.5925129 2.13e-08 6.3e-09 4.2e-08 2.91e-08 2.6e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 459269.6 
## 
## solution.v:
##  0.001569361 0.01004075 0.003904482 3.5143e-06 0.005324493 0.002757778 0.006691583 0.005325253 3.39282e-05 0.0008376987 0.0002060908 0.5776795 0.1117897 0.004608089 0.2692277 
## 
## solution.w:
##  5.6744e-06 2.88108e-05 1.2389e-06 0.0005010678 1.1833e-06 0.1784191 7.38e-06 2.2772e-06 2.0985e-06 5.4824e-06 0.0001639656 3.1588e-06 9.2957e-06 0.000108413 5.7524e-06 2.2388e-06 3.0666e-06 5.6741e-06 3.814e-06 0.2546853 2.8052e-06 0.3815977 5.2187e-06 1.1499e-06 1.6634e-06 6.2726e-06 7.707e-07 5.8146e-06 0.0001217957 8.25182e-05 9.176e-07 5.2343e-06 1.121e-06 9.891e-07 6.717e-07 2.9857e-06 0.1837989 2.2042e-06 0.0002015496 0.0001895489 5.2076e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13983603 
## 
## solution.v:
##  7.8252e-06 0.003433386 0.02131477 0.001702213 0.008278023 0.0004042207 0.0001088135 0.0003904398 0.1544478 0.0030909 0.06003136 0.1523563 0.3430397 0.123835 0.1275591 
## 
## solution.w:
##  9.362e-07 1.3641e-06 1.8238e-06 5.1276e-06 2.1472e-06 0.7162657 6.131e-07 1.7408e-06 5.362e-07 2.0631e-06 1.6624e-06 6.928e-07 7.73e-07 3.5059e-06 7.022e-07 8.242e-07 0.0002624685 5.416e-07 8.633e-07 8.9e-09 0.2304252 0.05261773 7.515e-07 1.601e-07 1.039e-06 1.4468e-06 3.1176e-06 7.94e-07 0.0002242497 5.455e-07 2.67669e-05 4.794e-07 6.192e-07 2.819e-06 3.47e-08 0.0001377879 9.693e-07 3.33e-07 5.34e-07 3.552e-07 1.269e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54412717 
## 
## solution.v:
##  0.07703876 0.03858764 0.0004272742 0.0003459099 0.0600797 0.1374875 0.08458009 0.07918764 0.02822398 0.07688059 0.06367693 0.1089047 0.1275021 0.06972742 0.04734981 
## 
## solution.w:
##  8.975e-07 2.428e-07 6.182e-07 3.323e-07 3.945e-07 3.7787e-06 2.285e-07 3.521e-07 2.099e-07 0.1782334 1.2491e-06 0.0004531474 9.99e-08 4.415e-07 4.397e-07 2.272e-07 1.5304e-06 2.505e-07 3.047e-07 1.216e-07 0.05629634 7.187e-07 2.824e-07 0.2911736 1.713e-07 5.848e-07 3.61e-07 3.294e-07 1.976e-07 4.007e-07 0.1140357 4.366e-07 2.653e-07 5.508e-07 0 1.079e-07 0.3275549 4.4e-07 5.818e-07 3.409e-07 0.03223557 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 167791131 
## 
## solution.v:
##  0.005785109 0.0008937089 0.09245763 0.01391658 0.0002626424 0.0004291541 0.0809945 0.001509748 0.03219404 0.1818702 0.08015177 0.2086848 0.1622793 0.009287807 0.129283 
## 
## solution.w:
##  1.56e-08 3.8e-09 2.1e-09 2e-10 1.4e-09 2e-10 8.8e-09 3e-10 1e-10 4e-10 8e-10 1e-10 2e-10 2e-10 2e-10 2e-10 1.7e-09 6.3e-09 2.1e-09 3e-10 2e-10 3e-10 1.3e-09 0.3025915 1e-10 1e-10 3.3e-09 2.7e-09 2e-10 1e-10 2.5e-09 1e-10 2.6e-09 7.81e-08 0.6567998 4e-10 7e-10 1.8e-09 2e-10 3e-10 0.0406085 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3448640 
## 
## solution.v:
##  0.1307744 6.20873e-05 0.2764332 0.02982756 0.04300042 0.2170857 0.05095524 5.47892e-05 0.03726239 0.004351108 0.002377283 0.04375327 0.08143148 0.004615202 0.07801581 
## 
## solution.w:
##  2.1e-09 2.6e-09 0.5068012 8.6e-09 8.6e-09 3.6e-09 1.4e-09 0.06796557 5.9e-09 1.84e-08 2.8e-09 3e-09 3.57e-08 3.3e-09 6.3e-09 5.6e-09 3.2e-09 1.2e-09 4e-09 2.8e-09 4.6e-09 4.6e-09 3.6e-09 3.8e-09 2.2e-09 3.5e-09 4.6e-09 2.8e-09 5e-09 1.09e-08 2.2e-09 6.8e-09 5.9e-09 6.1e-09 0.1541553 0.2710778 2.88e-08 1.1e-08 2.4e-09 1e-09 2e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6684354 
## 
## solution.v:
##  0.03457055 0.1088305 0.1679501 0.06306997 0.02135675 0.02053208 0.06256426 0.00935084 0.1309736 0.002518941 0.007206517 0.07846739 0.0577846 0.07246785 0.1623561 
## 
## solution.w:
##  2.95379e-05 0.02389059 8.4996e-06 9.8199e-06 9.9386e-06 0.2163189 1.10181e-05 1.906e-06 0.3613788 2.4308e-06 1.64505e-05 0.163212 2.07804e-05 5.9085e-06 2.78249e-05 3.34e-08 1.64885e-05 1.02689e-05 1.34272e-05 2.16148e-05 1.86567e-05 1.41511e-05 1.79459e-05 6.8746e-06 4.2043e-06 1.5175e-06 1.64358e-05 1.3479e-05 0.2076526 3.0988e-06 3.70056e-05 6.1297e-06 6.052e-06 1.05096e-05 2.9503e-06 3.8509e-05 3.7881e-06 8.5172e-06 0.0271139 1.18873e-05 5.5165e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10389214 
## 
## solution.v:
##  0.0007773158 0.02325303 0.1697524 0.2006928 0.01284259 0.03231723 0.1318039 0.02758967 4.75175e-05 0.06840444 0.08767604 0.03391277 0.1314117 0.002130077 0.0773885 
## 
## solution.w:
##  2.77896e-05 7.093e-07 0 3.48e-08 9.76e-08 2.192e-07 3.69e-08 4.64e-08 0.2322096 3.343e-07 3.815e-07 3.65e-07 4.65e-08 7.4e-09 2.61e-07 1.28412e-05 1.6425e-06 3.05e-08 7.58e-08 0.05069446 0.04320824 5.33e-08 2.03e-07 8.16e-08 6.97e-06 2.29e-08 1.911e-07 3.57e-08 5.91e-08 2.27e-08 1.169e-07 8.98e-08 6.305e-07 0.6738286 7.7e-09 3.45e-08 3.41e-08 2.2e-08 8.78e-08 5.4688e-06 7.57e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 42163526 
## 
## solution.v:
##  0.000495958 0.0007882117 0.08825988 0.1978245 0.1713818 0.02901181 0.06963495 0.007664988 0.004996036 0.04150003 0.01925319 0.2439116 0.08519466 0.02221132 0.01787102 
## 
## solution.w:
##  0.002190405 4.0192e-05 0.0004774574 7.26323e-05 0.0001195499 0.0002044322 0.5760788 2.90269e-05 0.0002537581 1.59732e-05 6.44352e-05 0.0001729949 3.81811e-05 9.51183e-05 0.0001347906 6.45556e-05 5.07236e-05 0.0007524945 5.99567e-05 2.7177e-06 0.0001574736 2.86831e-05 5.70293e-05 0.0005406701 1.51624e-05 2.41536e-05 0.0002276418 0.0001123451 2.97923e-05 2.05217e-05 0.0008639806 2.04331e-05 4.70364e-05 0.0001044858 2.5876e-05 0.1075001 4.4881e-05 0.235326 0.07384643 8.618e-06 8.05264e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2120773 
## 
## solution.v:
##  0.1121896 3.98018e-05 0.009439216 0.009376699 0.4065159 0.02973655 0.05402602 0.05883957 5.9e-08 0.0001449818 3.52e-08 0.05606083 0.09983251 0.001796597 0.1620017 
## 
## solution.w:
##  3.34738e-05 0.1617007 3.23403e-05 0.0001167437 3.28071e-05 0.0002821902 2.95357e-05 0.0003322595 2.09979e-05 0.09848646 0.0004104764 4.05109e-05 2.62049e-05 3.77355e-05 2.48547e-05 2.7919e-05 0.0003530763 2.01906e-05 4.73867e-05 0.1945932 0.0006994179 0.1889147 0.269108 3.15917e-05 7.8055e-06 2.96966e-05 0.0001083166 5.87396e-05 2.32311e-05 8.283e-07 7.37475e-05 7.41335e-05 1.82914e-05 6.31736e-05 1.7508e-06 5.6523e-05 4.50341e-05 1.54713e-05 3.6999e-05 2.063e-07 0.08398329 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 84513982 
## 
## solution.v:
##  0.06529328 0.1473974 0.1067588 0.1032542 0.1386738 0.002477865 0.04363853 0.06662761 0.08474396 0.0001657984 0.02246891 0.1004826 0.002198934 0.0429382 0.07288008 
## 
## solution.w:
##  3.2082e-06 7.1342e-06 1.97687e-05 0.2119577 6.5059e-06 5.8544e-06 0.0835887 1.18836e-05 4.3667e-06 7.8153e-06 7.5333e-06 9.9794e-06 7.5388e-06 0.02654424 5.9949e-06 5.8077e-06 8.1278e-06 8.1907e-06 1.8248e-05 4.5489e-06 4.4305e-06 0.03729319 4.2319e-06 1.60202e-05 6.3544e-06 0.3009688 7.9005e-06 4.2689e-06 1.21947e-05 0.3384613 8.5092e-06 7.2975e-06 5.3071e-06 6.0321e-06 0.0001646468 6.9333e-06 0.000726166 1.48708e-05 7.5785e-06 5.559e-06 3.53037e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22957676 
## 
## solution.v:
##  0.006687091 7.22723e-05 0.1633822 0.03264015 0.009701651 0.001422758 0.147355 0.1280997 0.0005468726 0.0002642121 0.04568171 0.05814537 0.09530951 0.1155836 0.1951078 
## 
## solution.w:
##  5.4e-06 6.2303e-06 1.3351e-05 1.02651e-05 2.03457e-05 2.02942e-05 0.05342132 6.4003e-06 2.27212e-05 1.03987e-05 9.0128e-06 4.72716e-05 1.16706e-05 2.37223e-05 1.02273e-05 1.27259e-05 3.17729e-05 6.7591e-06 7.8281e-06 8.0298e-06 0.2993932 7.7049e-06 1.3343e-05 1.06939e-05 9.641e-07 4.5668e-06 1.4271e-05 0.1454792 0.2897109 7.1577e-06 5.9752e-06 9.2237e-06 0.2100404 0.001516611 6.532e-07 4.60356e-05 6.5867e-06 5.3075e-06 1.37038e-05 5.7732e-06 1.9353e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28621018 
## 
## solution.v:
##  0.0003134783 0.01104585 0.02030062 0.3458673 0.02020913 0.0483464 0.007143137 0.03190808 0.06847506 0.02074829 0.001147869 8.5896e-05 0.1483625 0.2437197 0.03232658 
## 
## solution.w:
##  2.3225e-06 2.0735e-06 1.1337e-06 5.1808e-06 1.6338e-06 1.54863e-05 6.374e-07 0.06313979 0.0001119561 0.0634882 3.5891e-06 0.4023971 0.0003730177 1.3588e-06 5.1535e-06 1.78334e-05 6.075e-07 9.032e-07 7.8713e-06 0.4296988 5.30496e-05 1.481e-06 1.2894e-06 3.324e-07 1.443e-07 0.0001494167 6.3826e-06 6.0231e-06 9.41e-07 3.298e-06 3.1095e-05 6.342e-07 2.19682e-05 7.4664e-06 0.04040356 3.29856e-05 6.4e-09 2.5283e-06 2.2819e-06 4.367e-07 7e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6429576 
## 
## solution.v:
##  0.04614674 0.0335627 0.03214072 0.04141183 0.01413897 0.05915983 0.01662676 2.31e-08 0.009099174 0.001562986 0.1369886 0.05164072 0.02524076 0.001610418 0.5306698 
## 
## solution.w:
##  1.566e-07 9.217e-07 7.626e-07 3.545e-07 3.79906e-05 1.192e-07 0.03188279 1.0775e-06 4.3e-09 2.258e-07 3.815e-07 4.47e-08 0.0001310618 5.605e-07 8.71e-07 0.6230329 6.161e-07 9.427e-07 7.19453e-05 1.2733e-06 9.38e-08 3.953e-07 5.1186e-06 1.313e-07 0.1144027 6.8821e-06 2.477e-07 7.89e-08 5.585e-07 1.4936e-06 1.0494e-06 1.328e-07 4.199e-07 6.415e-07 0.2304099 3.507e-06 5.7e-07 5.06e-07 3.321e-07 1.255e-07 9.55e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7453980 
## 
## solution.v:
##  8.757e-07 0.004654967 0.001290155 0.0115735 8.457e-07 4.91938e-05 0.2079304 0.01203989 0.02211011 0.0012332 0.3991839 0.08264741 0.0498586 0.1277834 0.07964347 
## 
## solution.w:
##  4e-10 3.412e-07 0.0006359634 7.411e-07 5.9209e-06 2.652e-07 0.1080413 5.3291e-06 3.3022e-06 5.454e-07 4.326e-07 3.0136e-06 1.0425e-06 7.067e-07 1.2272e-06 1.9358e-06 8.532e-07 1.0696e-06 4.4348e-06 3.869e-07 2.874e-07 5.334e-07 1.377e-07 3.2132e-06 0.0002996496 1.8206e-06 1.1333e-06 0.7912029 2.4926e-06 8.268e-07 8.073e-07 9.684e-07 1.2323e-06 2.69572e-05 0.0003145156 9.872e-07 7.778e-07 7.37449e-05 7.423e-07 5.856e-07 0.09935693 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 315734263 
## 
## solution.v:
##  0.0007880094 0.001359123 0.01369879 0.01649537 0.01059048 2.7213e-05 0.03503427 0.1055587 0.009609074 0.0023222 0.0002301868 0.2475378 0.06979425 0.1725051 0.3144494 
## 
## solution.w:
##  2.1e-09 1.4e-09 9.36e-08 9e-09 8.7e-09 1.8e-09 5.86e-08 6e-09 1.19e-08 2.3e-09 2.2e-09 3.77e-08 4e-09 1.29e-08 8.5e-09 1.05e-08 2.5e-09 1e-08 8.8e-09 2.6e-09 2.4e-09 3.2e-09 1.3e-09 2.29e-08 0.4942703 4.79e-08 5.2e-09 5e-09 4.38e-08 2.3e-09 7.7e-09 1.18e-08 7.2e-09 1.05e-08 5.2e-09 3.2e-09 2.668e-07 5.0394e-06 3.3e-09 3.3e-09 0.5057239 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5967355 
## 
## solution.v:
##  0.06140801 0.0001006636 0.008520328 0.03141596 0.02954653 0.002820434 0.1260606 0.01302898 0.01820931 0.1056939 0.0710013 0.1186274 0.05083307 0.1304842 0.2322493 
## 
## solution.w:
##  5.51e-08 0.1923034 0.1092873 8.1244e-06 6.8809e-06 1.85e-08 4.3455e-06 8.4981e-06 0.001041075 5.3362e-06 4.3068e-06 4.8812e-06 0.1583767 6.2158e-06 3.978e-06 8.2488e-06 0.0004277222 7.9699e-06 1.47488e-05 1.6799e-06 0.4191957 3.9258e-06 5.958e-07 2.1497e-06 1.7643e-06 9.8948e-06 0.0003080109 1.12687e-05 5.342e-06 2.85372e-05 1.21393e-05 0.1187978 3.9327e-06 8.152e-06 9.01e-08 2.1673e-06 1.4661e-06 3.0112e-06 8.00784e-05 1.9791e-06 5.148e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28772735 
## 
## solution.v:
##  0.1135884 0.006590016 0.0252251 0.09341816 0.02219494 0.08367513 0.02299876 0.1995637 0.04036498 0.01184488 0.05903351 6.61266e-05 0.06059253 0.2403332 0.02051057 
## 
## solution.w:
##  2.6e-09 3.7e-09 4.4e-09 2.62e-08 2.4e-09 2.61e-08 1.8e-09 4.3e-09 3.4e-09 2.56e-08 9.3e-09 5.3e-09 5.2e-09 0.6565833 6.8e-09 2.8e-09 3.3e-09 3.3e-09 3.4e-09 6.8e-09 2.04e-08 4.392e-07 6.6e-09 6.9e-08 3.3e-09 3.5e-09 5.8e-09 1.8e-09 4.9e-09 6e-09 1e-10 3.3e-09 8e-09 7e-10 1.9e-09 0.3253737 6.7e-09 7.4e-09 8.1e-09 7.1e-09 0.01804223 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 32030293 
## 
## solution.v:
##  0.1101046 0.004134924 0.06028605 0.1980738 5.80234e-05 0.112447 0.02301711 0.1001702 0.002619614 3.3132e-05 0.01342545 0.0857461 0.03661832 0.1391094 0.1141563 
## 
## solution.w:
##  2.05289e-05 1.61943e-05 0.6599622 5.20421e-05 2.22264e-05 4.82142e-05 9.49e-07 2.20538e-05 6.63732e-05 8.942e-06 2.36287e-05 0.0001105449 1.79594e-05 2.58212e-05 6.22566e-05 2.12212e-05 8.3938e-06 3.33026e-05 2.56575e-05 1.1274e-06 3.90703e-05 5.87741e-05 9.885e-06 0.005985682 1.00316e-05 5.3862e-05 5.9945e-05 1.96885e-05 0.05550972 1.75442e-05 3.23924e-05 2.74205e-05 1.97464e-05 8.1507e-06 2.19185e-05 0.1604653 4.37894e-05 8.33653e-05 5.11578e-05 7.2892e-06 0.1169256 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3513760 
## 
## solution.v:
##  0.06596027 0.06406815 0.06532202 0.008185256 0.0622469 0.07767577 0.03248141 0.04038904 0.01665088 0.1014383 0.02248477 0.1202518 0.08601011 0.1471129 0.08972243 
## 
## solution.w:
##  7.49856e-05 4.64288e-05 7.6278e-06 2.7826e-05 2.33155e-05 0.2331505 1.61961e-05 1.33944e-05 0.06587092 1.40086e-05 2.1486e-05 1.59394e-05 0.01897104 5.1594e-05 7.47471e-05 3.31e-05 1.94327e-05 0.1018409 1.62191e-05 0.02063232 3.7e-09 0.2202722 1.23426e-05 1.43405e-05 1.3448e-05 7.3614e-06 0.0002157287 1.95258e-05 3.68417e-05 0.0003055532 0.02769478 1.77039e-05 1.82569e-05 2.25157e-05 1.20581e-05 2.3871e-06 0.0001512495 9.3992e-06 9.2281e-06 0.3102357 7.4438e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18409596 
## 
## solution.v:
##  0.001678366 0.0001114867 0.006058752 0.0006228314 0.09576567 0.0982952 0.28758 0.1646259 0.06049334 0.003550322 0.06546906 0.00593222 0.1561466 0.003689523 0.04998077 
## 
## solution.w:
##  3.555e-07 1.3769e-06 1.99e-08 1.86e-08 2.55e-08 1e-10 3.74e-08 2.21e-08 9.45e-08 2.87e-08 9.8e-08 1.23e-07 1.47e-08 1.49e-08 5.59e-08 7.36e-08 4.76e-08 2.98e-08 4.55e-08 3.66e-08 5.15e-08 6e-10 3.13e-08 3.85e-08 6.86e-08 8.9e-09 4.62e-08 5.51e-08 3.05e-08 1.3e-08 8.3e-09 4.58e-08 4e-08 3.3e-08 3.13e-08 1.67e-08 2.06e-08 1.78e-08 2.88e-08 0.9501729 0.04982398 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 207926183 
## 
## solution.v:
##  0.006132482 0.03266021 0.1259268 0.03495581 0.01928778 0.003218439 0.00654155 0.1544593 0.01739707 0.1257134 0.06248242 0.1232369 0.151313 0.07250443 0.06417043 
## 
## solution.w:
##  3.14e-08 3.03e-08 5.65e-08 3.58e-08 2.79e-08 1.36e-08 0.00012778 2.58e-08 9.26e-08 1.02e-08 2.37e-08 4.12e-08 1.16e-08 4.07e-08 2.55e-08 3.57e-08 1.46e-08 0.2418237 9.56e-08 2.81e-08 2.15e-08 1.86e-08 9.1e-09 2.16e-08 0.1672635 1.04e-08 2.67e-08 1.368e-07 4.384e-07 1.5e-08 1.69e-08 3.4e-08 2.87e-08 4.47e-08 1.005e-07 0.5907806 2.26e-08 3.15e-08 2.745e-06 2.17e-08 1.36e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_loohi <- mspe.test(placebos_loohi, discard.extreme = FALSE)

mspe_test_loohi$p.val
## [1] 0.1860465

LOO 3: ID

Prepare Data (LOO ID)

ds_state_slim_looid <- ds_state_slim %>% filter(state != "ID")


ds_state_slim_looid <- ds_state_slim_looid %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "HI" ~ 7,
             state == "IA" ~ 8,
             state == "IL" ~ 9,
             state == "IN" ~ 10,
             state == "KS" ~ 11,
             state == "KY" ~ 12,
             state == "LA" ~ 13,
             state == "MD" ~ 14,
             state == "ME" ~ 15,
             state == "MI" ~ 16,
             state == "MO" ~ 17,
             state == "MS" ~ 18,
             state == "MT" ~ 19,
             state == "NC" ~ 20,
             state == "ND" ~ 21,
             state == "NE" ~ 22,
             state == "NH" ~ 23,
             state == "NJ" ~ 24,
             state == "NM" ~ 25,
             state == "NV" ~ 26,
             state == "NY" ~ 27,
             state == "OH" ~ 28,
             state == "OK" ~ 29,
             state == "OR" ~ 30,
             state == "PA" ~ 31,
             state == "RI" ~ 32,
             state == "SC" ~ 33,
             state == "SD" ~ 34,
             state == "TN" ~ 35,
             state == "TX" ~ 36,
             state == "UT" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))




data_prep_out_looid <- dataprep(
  foo = ds_state_slim_looid,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_looid$state_id[ds_state_slim_looid$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO ID)

synth_out_looid <- synth(
  data.prep.obj = data_prep_out_looid)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19291117 
## 
## solution.v:
##  0.004549715 9.0828e-06 2.18367e-05 0.02330586 0.01448299 7.79581e-05 0.1869251 4.2359e-06 0.001074504 0.09358566 0.0006316192 0.1602795 0.3132276 0.2006259 0.001198422 
## 
## solution.w:
##  1.5392e-06 2.1896e-06 0.1741164 2.0492e-06 4.735e-07 0.3484488 8.879e-07 1.0548e-06 1.6487e-06 1.1597e-06 1.4117e-06 1.2772e-06 7.263e-07 9.278e-07 1.4251e-06 1.7563e-06 4.3123e-06 6.172e-06 3.9676e-06 7.81e-08 9.519e-07 1.6166e-06 3.3248e-06 1.3095e-06 0.02736039 4.3453e-06 1.4245e-06 6.9467e-06 2.16e-08 1.8454e-06 1.5407e-06 2.6637e-06 6.34e-07 0.1196736 6.41204e-05 0.2847394 2.3527e-06 1.2631e-06 1.9272e-06 1.3977e-06 1.0204e-06 0.04552965
synth_AZ_median_contributions_looid <- as.numeric(data_prep_out_looid$Y0 %*% synth_out_looid$solution.w)

Hypothesis Testing (LOO ID)

placebos_looid <- generate.placebos(
  dataprep.out = data_prep_out_looid,
  synth.out = synth_out_looid,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7238122 
## 
## solution.v:
##  0.001281934 0.1513944 0.04993998 0.05602046 0.1831308 0.09602772 0.06063068 1.59962e-05 0.00199349 9.5282e-05 0.0003515535 0.1807267 0.06670206 0.05319169 0.09849729 
## 
## solution.w:
##  0.200955 1.05767e-05 4.2517e-06 1.77368e-05 1.0708e-06 0.1627522 1.4788e-06 0.1721825 1.1e-06 1.78325e-05 1.11358e-05 1.2017e-06 1.9635e-06 0.125505 6.4107e-06 1.8998e-06 4.1289e-06 7.0376e-06 1.123e-07 9.3914e-06 6.2054e-06 3.3039e-06 1.73478e-05 2.3428e-06 1.8608e-06 1.10488e-05 0.0002407065 0.01563966 1.9275e-06 1.8566e-06 1.04995e-05 1.2272e-06 3.11695e-05 2.96363e-05 4.705e-07 7.881e-07 2.8136e-06 0.0007969037 0.3216991 0 9.0658e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4383470 
## 
## solution.v:
##  0.005096356 0.002687775 0.2588406 3.33e-08 0.000469529 0.03026838 0.00600365 0.0001928866 0.0003221738 0.006916734 0.003221742 0.2302027 0.002394863 0.1165903 0.3367922 
## 
## solution.w:
##  2.528e-06 5.416e-07 2.565e-07 5.956e-07 2.265e-07 0 0.1572935 1.1724e-06 0.4885286 4.464e-07 3.397e-07 6.694e-07 1.442e-07 5.14e-07 1.3606e-06 0.01783125 1.988e-07 7.036e-07 3.064e-07 1.233e-07 2.227e-07 0.2798429 2.827e-07 2.7208e-06 1.4853e-06 3.6e-07 5.5643e-06 2.238e-07 1.23e-08 4.15e-07 2.619e-07 2.57e-07 2.0322e-05 1.08285e-05 2.779e-07 9.655e-07 2.24e-07 4.185e-07 3.173e-07 0.05644842 7.08e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 572005.9 
## 
## solution.v:
##  0.1832204 0.1403948 8.42675e-05 0.04204594 0.02749997 9.87767e-05 0.1138344 0.02102839 0.01679045 0.004504333 0.01082904 0.08192342 0.1557972 0.07802389 0.1239247 
## 
## solution.w:
##  6.741e-07 1.6161e-06 2.497e-06 2.0806e-06 0.3426342 4.224e-07 6.55e-07 3.89e-07 2.115e-07 5.775e-07 1.0149e-06 2.867e-07 5.8e-07 4.09e-07 4.629e-07 6.259e-07 2.569e-07 0.1427472 9.53e-08 1.885e-07 1.0515e-06 1.4607e-06 1.69e-06 2.667e-07 1.4328e-06 5.52e-07 6.892e-07 5.19279e-05 1.0143e-06 0.0001193413 0.366017 1.827e-07 8.716e-07 0.002561386 0.1231751 1.0938e-06 4.04e-07 0.02266921 4.297e-07 1.16e-07 3.621e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7358634 
## 
## solution.v:
##  0.1399172 0.0002577771 0.01005792 0.04900933 0.1795811 0.05273785 0.06676314 0.02259327 0.008309459 1.0879e-05 0.06070648 0.1780089 0.009748914 0.1679223 0.05437552 
## 
## solution.w:
##  3.0704e-05 5.03063e-05 0.005981317 6.53293e-05 1.7926e-06 0.1860159 7.95399e-05 2.27558e-05 0.0002938489 4.17491e-05 5.5362e-05 3.47058e-05 0.2004489 3.62325e-05 4.10887e-05 0.0001493765 3.88451e-05 4.1351e-05 2.82688e-05 8.0881e-05 0.3300251 0.06374525 0.02358125 1.46646e-05 0.03387857 6.14927e-05 3.15295e-05 0.0002652475 0.0001168455 0.00374677 9.95739e-05 2.7767e-05 2.3609e-05 4.24482e-05 0.1505808 3.37e-08 4.842e-05 5.47293e-05 8.47877e-05 1.93542e-05 1.35318e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3068181 
## 
## solution.v:
##  0.0003730338 0.004498048 0.001653103 0.07005856 0.004518657 0.321784 0.009281959 0.005854404 0.1944171 5.37238e-05 0.01458854 0.1622929 0.00617563 0.04566482 0.1587855 
## 
## solution.w:
##  0.0001180509 0.0001481618 0.3992432 0.0005152575 0.0001637501 0.0002606087 0.0006678047 0.0001401294 0.0001446968 0.0002347984 9.35629e-05 0.0006870035 0.001049608 0.1778205 0.0001650344 0.0001635194 0.0001078833 0.0001126087 0.1218542 0.0001656438 0.000828824 0.04174576 0.0001202508 8.53752e-05 0.09157845 0.0001882626 0.0002566332 0.003614144 0.0005840534 0.0002584867 1.2342e-06 0.0001515771 0.1301213 0.0254204 0.0001014767 0.0002168409 0.0001719083 0.000236357 0.000291637 0.0001344352 3.66768e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29509006 
## 
## solution.v:
##  4.15356e-05 0.0004411446 0.0001039142 0.06695179 4.03082e-05 0.0984888 0.0003360206 0.1014053 0.0001944533 0.1431217 0.0004511854 0.1259081 0.1518991 0.2870561 0.02356059 
## 
## solution.w:
##  5.596e-07 4.835e-07 2.0315e-06 9.188e-07 1.7819e-06 5.44e-07 2.381e-06 1.4512e-06 4.809e-07 8.152e-07 2.2609e-06 1.3898e-06 4.3583e-06 1.67e-06 1.4561e-06 5.3e-07 7.519e-07 1.5804e-06 1.7485e-06 5.958e-07 8.36e-07 4.649e-07 6.637e-07 3.749e-07 0.2295723 1.135e-06 1.6983e-06 1.7497e-06 7.651e-07 4.1e-09 1.0651e-06 3.9819e-06 1.8689e-06 1.9857e-06 0.1895101 6.449e-07 1.09931e-05 8.7503e-06 6.599e-07 6.599e-07 0.5808515 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056637 
## 
## solution.v:
##  0.0006379761 0.001275001 0.02068504 0.009018527 8.35008e-05 4.91176e-05 0.001420588 0.0124105 0.05122009 4.74368e-05 0.0916636 0.2518669 0.386618 0.09288321 0.0801205 
## 
## solution.w:
##  2.16e-08 4.49e-08 3.7e-09 1.61e-08 6e-09 3e-10 5.8e-09 9.1e-09 2.79e-07 4.04e-08 1.45e-08 3.3e-08 9.7e-09 1.55e-08 1.06e-08 1.43e-08 5.7e-09 7.8e-09 1.01e-08 3.15e-08 4.75e-08 0.999999 1.06e-08 1.9e-09 2.9e-09 1.99e-08 4.5e-09 6.7e-09 2.08e-08 3.21e-08 8.6e-09 2.24e-08 5.4e-09 4.5e-09 7e-10 2e-08 5.6e-09 3.4e-09 9.02e-08 6.66e-08 1e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17627685 
## 
## solution.v:
##  0.07507826 0.1432605 0.000300679 0.0001469393 2.12697e-05 0.002939729 0.002055703 0.07640791 1.6692e-05 0.06354714 0.05412963 0.1313028 0.04896989 0.1991209 0.2027019 
## 
## solution.w:
##  1.3134e-06 8.9904e-06 3.6e-09 1.0783e-06 9.111e-07 0.09583121 1.4873e-06 1.733e-06 1.06358e-05 1.6758e-06 1.3169e-06 0.07883087 8.897e-07 1.0282e-06 1.123e-06 5.7147e-06 4.0351e-06 0.0004328256 1.0056e-06 1.7318e-06 1.0895e-06 1.7467e-06 1.7213e-06 2.2604e-06 2.2807e-06 2.219e-06 1.0046e-06 1.198e-06 0.3188673 0.04533316 1.0146e-06 5.173e-07 3.829e-07 0.3070338 0 1.37731e-05 6.345e-07 1.3842e-06 1.6237e-06 1.6975e-06 0.1535915 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2496665 
## 
## solution.v:
##  0.1180416 0.09103608 0.009084737 0.01429965 0.1250707 0.002907586 0.01167891 0.09467038 0.01894786 0.007544638 0.05028605 0.1497265 0.184796 0.1212582 0.0006511566 
## 
## solution.w:
##  0.05680787 7.938e-07 4.817e-07 3.217e-07 4.738e-07 4.125e-07 4.634e-07 5.538e-07 4.592e-07 4.7e-07 2.0837e-06 6.207e-07 2.633e-07 0.2916694 0.3445116 4.431e-07 6.974e-07 5.305e-07 5.965e-07 0.009952247 2.812e-07 2.527e-07 8.857e-07 0.156107 5.431e-07 4.8317e-06 0.1041354 5.383e-07 3.331e-07 2.274e-07 4.278e-07 3.431e-07 8.517e-07 7.126e-07 8.205e-07 9.514e-07 2.691e-07 4.9098e-06 2.0932e-06 4.6528e-06 0.03678288 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 78939808 
## 
## solution.v:
##  0.01107631 0.08157241 0.1185371 0.05662404 0.1268962 0.0001707582 0.07683774 0.001953592 0.0001993719 0.0158764 0.06338541 0.1031005 0.06260393 0.1130028 0.1681633 
## 
## solution.w:
##  3.28e-08 5.51e-08 1.788e-07 1.1866e-06 4.375e-07 3.435e-06 2e-10 4.94129e-05 8.11e-08 3.367e-07 1.199e-07 4.2756e-06 3.15315e-05 1.755e-07 1.816e-07 0.5723025 2.285e-07 1.663e-07 1.13267e-05 0.3914246 4.547e-07 0.03576363 2.39e-07 1.783e-07 0.0003767463 1.332e-07 1.202e-07 7.29e-08 3.591e-06 1.0435e-05 6.27e-08 9.9094e-06 3.825e-07 2.129e-07 1.962e-07 1.358e-07 2.7144e-06 9.37e-08 1.399e-07 2.974e-07 7.1e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2211323 
## 
## solution.v:
##  0.09889612 0.0003598512 0.01226455 0.0110277 0.001275597 0.04655091 3.38168e-05 0.001797989 0.003886941 0.0007567696 0.1588183 0.1018596 0.2276475 0.1772731 0.1575513 
## 
## solution.w:
##  0.0002802645 0.1081813 2.6488e-06 4.5004e-06 4.9204e-06 2.0052e-06 0.3849863 4.065e-06 3.3258e-06 3.1099e-06 0.09030535 1.45092e-05 1.91606e-05 1.15971e-05 3.6377e-06 6.3586e-06 9.2591e-06 9.0104e-06 0.1983547 3.4943e-06 7.4051e-05 2.8329e-06 6.5291e-06 1.9478e-06 1.3631e-06 0.114146 3.0685e-06 6.4343e-06 5e-09 8.2182e-06 2.22511e-05 0.06515338 3.5357e-06 3.9398e-06 1.0869e-06 3.8127e-06 4.1949e-06 3.0413e-06 0.0001614225 0.0027703 0.03541305 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 31240253 
## 
## solution.v:
##  0.06346283 0.0009292289 0.09430908 0.0007314459 0.02852071 0.003384291 0.3089159 0.08975121 0.01844064 0.00192408 0.04004097 0.05488338 0.08391108 0.1036327 0.1071624 
## 
## solution.w:
##  0.03292038 4.17943e-05 6.35242e-05 2.63775e-05 4.28358e-05 4.68591e-05 1.5132e-06 4.2182e-06 0.1971317 1.32791e-05 0.0001758134 8.5311e-06 1.68462e-05 0.02257246 0.2197168 1.4577e-05 9.9207e-06 0.0001030832 2.06227e-05 2.37e-08 2.83897e-05 3.33456e-05 4.46357e-05 8.7774e-06 6.188e-07 5.35024e-05 0.00330382 3.08872e-05 1.39967e-05 1.13764e-05 0.001616521 0.3796626 0.0001041464 0.0005565791 0.1390936 1.21642e-05 6.02874e-05 0.001915721 1.86746e-05 1.33928e-05 0.0004857602 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 26448166 
## 
## solution.v:
##  0.04511223 2.81689e-05 0.1090031 0.004086323 0.0347966 0.2862401 0.0008582518 0.006313222 0.009886853 0.06053165 0.00788549 0.08579075 0.2103401 0.1267585 0.01236865 
## 
## solution.w:
##  3.9752e-06 5.8834e-06 8.0359e-06 4.8042e-06 4.9745e-05 2.4734e-06 3.1186e-06 1.54118e-05 4.8153e-06 4.0564e-06 5.2402e-06 4.9249e-06 4.8e-09 9.48112e-05 9.129e-06 4.7068e-06 1.679e-06 8.9027e-06 0.0827698 2.171e-06 7.076e-07 2.83319e-05 2.6192e-06 3.0335e-06 2.6886e-06 6.5027e-06 3.3018e-06 0.09870063 0.0002868061 0.1138733 4.7829e-06 1.02708e-05 1.27964e-05 4.4346e-06 1.13297e-05 0.6614114 5.3242e-06 8.8178e-06 3.4299e-06 0.04261569 1.079e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 941148.1 
## 
## solution.v:
##  0.15717 0.03380821 0.008318848 0.02596286 0.0001920408 0.006889248 0.04671775 0.0003801522 2.52233e-05 0.0001281065 0.0001419096 0.5409279 9.57308e-05 0.117366 0.06187605 
## 
## solution.w:
##  3.0622e-06 3.4305e-06 9.961e-07 0.09653718 2.5094e-06 8.296e-07 1.26e-08 2.9718e-06 1.8116e-06 0.05054105 6.2818e-06 2.6278e-06 4.9695e-06 2.5588e-06 2.5759e-06 3.01051e-05 0.05572097 2.5722e-06 8.43471e-05 6.3952e-06 0.0528256 0.2253292 6.306e-07 3.5376e-06 8.512e-07 3.2019e-06 2.1938e-06 1.5632e-06 1.56331e-05 1.4235e-06 1.092e-07 5.4513e-06 2.2716e-06 1.8085e-06 8.708e-07 1.5383e-06 0.5188196 1.5014e-06 6.4047e-06 1.33198e-05 6.0045e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10287752 
## 
## solution.v:
##  0.001032062 0.0005299466 0.03651862 0.1374021 0.01055732 0.004759778 0.189244 0.03459441 0.03632958 4.42874e-05 0.0968708 0.04784017 0.08416521 0.1513529 0.1687589 
## 
## solution.w:
##  3.5905e-06 3.9245e-06 2.988e-06 2.2124e-06 0.03670744 1.4864e-06 2.1146e-06 3.6571e-06 2.11591e-05 6.552e-07 7.7683e-06 0.1193354 0.1429111 1.4521e-06 0.2435136 1.0638e-06 9.557e-07 3.1424e-06 0.004741571 4.872e-07 0.1223293 3.1572e-06 1.3517e-06 8.524e-07 2.295e-07 0.2317957 4.4935e-06 1.8063e-06 1.2738e-06 2.5885e-06 1.805e-06 4.4903e-06 6.0816e-06 3.8649e-06 8.215e-07 1.1477e-06 2.1001e-06 0.09856848 2.0141e-06 4.542e-07 2.2428e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6651456 
## 
## solution.v:
##  5.857e-06 0.01127807 0.0003430694 0.0005218181 0.1187978 0.0002855628 0.08918788 0.167267 0.06399364 0.13656 0.01396333 0.08854352 0.04284269 0.09135538 0.1750544 
## 
## solution.w:
##  6.4746e-06 3.49e-07 0.0002056704 0.0008330889 0.0005742608 4.47789e-05 0.05709999 8.49302e-05 0.4798712 0.0001391675 5.30651e-05 0.002440535 8.21775e-05 0.0001097543 0.2222064 0.0003765082 3.75284e-05 5.87937e-05 5.2753e-05 9.5413e-05 0.0001248475 0.004010374 7.93835e-05 2.56489e-05 0.0002983341 0.0005731074 4.63e-08 0.0001139039 4.04771e-05 0.03261207 0.0002594698 4.90327e-05 0.1968397 4.17579e-05 8.76308e-05 0.000106623 6.4358e-05 5.23829e-05 0.0001920173 4.352e-05 1.24487e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10629403 
## 
## solution.v:
##  0.2060692 0.0005477756 0.03843216 0.1068437 9.98e-08 0.009196608 4.93496e-05 2.0865e-06 0.1978846 0.003107982 1.10467e-05 0.1716689 0.06703633 0.02783677 0.1713134 
## 
## solution.w:
##  0.09068749 0.2779793 3.7203e-06 2.2549e-06 4.3209e-06 1.7816e-06 2.1881e-06 7.0209e-06 8.7097e-06 0.1032154 5.0419e-06 5.9609e-06 2.0265e-06 1.3292e-06 3.3336e-06 1.40341e-05 9.188e-07 1.8351e-05 5.507e-07 5.7945e-06 1.7373e-06 0.01818463 2.2612e-06 0.03693692 1.5118e-06 4.4831e-06 0.002368575 1.7841e-06 3.1928e-06 1.8031e-06 1.46611e-05 8.8573e-06 0.001167456 3.34814e-05 3.776e-06 4.3592e-06 2.3929e-06 2.7209e-06 1.7185e-06 0.3937621 0.07552206 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 25852880 
## 
## solution.v:
##  0.1092822 0.02868544 0.01989272 0.09500214 0.09799746 0.02865206 0.0007409601 0.1434973 0.152603 0.01149255 0.006138142 0.01436558 0.05616187 0.06243254 0.1730561 
## 
## solution.w:
##  3.33539e-05 8.5749e-06 4.4093e-06 8.5306e-06 5.9541e-06 6.0307e-06 2.40179e-05 5.1427e-06 1.29914e-05 2.36328e-05 1.45024e-05 7.5642e-06 9.918e-07 0.3505384 1.12445e-05 7.5965e-06 1.67802e-05 8.4036e-06 0.002142196 0.0001261994 1.07668e-05 9.8179e-06 2.17116e-05 0.1022275 1.2322e-06 1.18179e-05 7.9397e-06 4.89009e-05 4.6201e-06 2.488e-06 2.28328e-05 1.37283e-05 4.5804e-06 4.6634e-06 1.3e-09 0.1598758 9.764e-06 7.4463e-06 4.43207e-05 0.1176921 0.2669715 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2879220 
## 
## solution.v:
##  0.01227101 0.0001785181 0.02605318 0.002128738 0.0334532 0.02311049 0.1471751 0.0387955 0.03808027 0.104816 0.08044027 0.1537778 0.09372189 0.1678556 0.07814237 
## 
## solution.w:
##  1.28064e-05 0.1218425 1.48869e-05 4.9962e-06 6.2625e-06 3.44026e-05 6.9379e-06 1.69913e-05 5.7461e-06 8.4837e-06 6.0356e-05 0.07118904 0.09947019 5.0619e-06 7.0573e-06 7.7243e-06 1.00321e-05 3.7481e-06 4.3151e-06 4.4382e-06 6.3939e-06 8.32282e-05 5.9687e-06 1.2739e-06 0.007268764 8.8709e-06 8.1674e-06 4.1249e-06 2.8512e-05 0.05247834 3.15696e-05 0.00093405 0.3787422 1.68731e-05 0.01144714 0.05970911 0.01724813 7.1924e-06 3.628e-06 5.0732e-06 0.1792454 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 73768079 
## 
## solution.v:
##  0.04419438 0.0008738236 0.0438017 0.003448574 0.07152784 0.01720168 0.004720789 0.05593679 0.09708831 0.1573823 0.01009841 0.37547 0.02749759 0.0225586 0.06819928 
## 
## solution.w:
##  4.9918e-06 4.48e-08 1.216e-06 2.50221e-05 2.3158e-06 1.0051e-06 0.2085858 2.0483e-06 7.1528e-06 2.4452e-06 6.3074e-06 5.0006e-06 5.2992e-06 5.96858e-05 3.8202e-06 8.2827e-06 3.9198e-06 8.1509e-06 3.7918e-06 1.40115e-05 1.1879e-06 1.8398e-06 1.0477e-06 7.213e-07 6.249e-07 1.07177e-05 4.8808e-06 4.0129e-06 0.6962121 9.383e-07 5.8033e-06 3.25062e-05 2.7441e-06 2.2405e-06 8.379e-07 4.315e-06 2.9626e-06 1.5448e-06 3.71437e-05 0.09491868 2.8981e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 34019501 
## 
## solution.v:
##  0.002906929 2.65559e-05 0.1533211 0.06204255 0.09013121 0.09757012 0.02706564 0.008374371 0.1700576 0.02794236 0.08954492 0.08979701 0.1345077 0.004820225 0.04189165 
## 
## solution.w:
##  1.076e-06 3.42e-08 7.8e-09 3.65e-08 1.23e-08 2.93e-08 0.5093641 3.3e-08 1.0239e-06 0.2515696 1.048e-07 7.9124e-06 1.14e-08 7.2e-08 3.65e-08 1.375e-07 4.5392e-06 2.249e-07 5.24e-08 6.042e-07 1.76e-08 0 1.215e-07 7.05e-08 8e-10 3.865e-07 0.07654578 1.27e-08 2.91e-08 2.21e-08 0.1624818 9.2788e-06 2.67e-08 4.8e-09 5.2e-09 4.5e-09 2.37e-08 9.4e-09 9.5e-08 2.159e-07 1.24373e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5608927 
## 
## solution.v:
##  0.06409475 0.09517574 0.002048808 0.04626489 0.01585459 0.0730514 2.96767e-05 0.01908686 0.007517021 0.1264623 0.0007880513 0.1617979 0.07512103 0.08877268 0.2239343 
## 
## solution.w:
##  6.627e-07 1.2659e-06 3.301e-07 0.165664 3.429e-07 1.773e-07 0.5592074 2.472e-07 8.106e-07 8.34e-08 1.4077e-06 6.531e-07 1.0185e-06 2.459e-07 6.4683e-06 5.408e-07 1.686e-07 9.869e-07 3.264e-07 0.05847949 1.754e-07 0 7.942e-07 1.832e-07 6.103e-07 4.0077e-06 3.172e-07 1.4847e-06 0.06634173 9e-10 2.594e-07 3.897e-07 1.587e-07 1.973e-07 1.262e-07 6.023e-07 0.1494383 8.975e-07 0.0008003052 4.19861e-05 7.776e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17839722 
## 
## solution.v:
##  0.01180235 0.01456511 0.05304212 1.55893e-05 0.03470763 0.02170563 2.1585e-06 3.5915e-06 0.03226333 0.0001420033 0.02128077 0.3436453 0.04423942 0.2311224 0.1914626 
## 
## solution.w:
##  1.36e-07 2.458e-07 1.682e-07 5.085e-07 2.008e-07 4e-08 0.8676365 1.979e-07 9.75e-08 2.23e-07 2.045e-07 1.444e-07 2.828e-07 3.562e-07 1.248e-07 1.634e-07 1.0243e-06 7.14e-08 1.632e-07 1.478e-07 7.46e-08 3.002e-07 7.51e-08 1.72e-08 1.588e-07 2.415e-07 1.481e-07 1.176e-07 1.7149e-06 2.981e-07 5.813e-07 1.303e-07 1.11e-07 1.698e-07 2.47e-08 0.1323545 9.75e-08 5.64e-08 1.455e-07 9.06e-08 3.3e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54634168 
## 
## solution.v:
##  6.70425e-05 0.03682967 0.0824092 0.00324947 0.001137942 0.05928912 0.09330555 0.03256941 0.1157712 0.06952788 0.0951279 0.05722354 0.1125131 0.08981585 0.1511632 
## 
## solution.w:
##  3.33409e-05 5.96745e-05 0.0001005125 9.63598e-05 4.82925e-05 0.0003788233 0.000111275 0.0001345839 3.01264e-05 0.000420174 7.48507e-05 0.01952137 0.0001462569 0.04888471 8.97093e-05 3.93709e-05 0.001263033 0.05453252 5.1993e-05 4.10893e-05 5.8056e-05 0.110648 9.6222e-05 0.3949285 4.63254e-05 0.0001699098 2.14749e-05 0.0002148046 0.000183848 0.002268018 0.336191 6.60208e-05 1.90369e-05 2.54056e-05 3.19e-08 4.00168e-05 0.0002734939 4.6032e-05 0.0004133492 0.02818001 5.24191e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 167788201 
## 
## solution.v:
##  0.007242934 0.002943216 0.2792712 0.02955055 0.007973905 0.002513828 0.1159819 0.01326753 0.05698293 0.1522887 0.02313685 0.224782 0.01392321 0.009594944 0.06054632 
## 
## solution.w:
##  7.79e-08 5.96e-08 2.51e-08 5.1e-09 3.89e-08 1.03e-08 5.1e-09 1.07e-08 7.4e-09 1.26e-08 2.06e-08 9.2e-09 9.3e-09 4.9e-09 1.05e-08 1.22e-08 4.2e-09 1e-10 5.31e-08 8.1e-09 4.7e-09 7.2e-09 2.01e-08 0.3030105 4.1e-09 6.7e-09 4.06e-08 1.35e-08 6.3e-09 3.8e-09 1e-10 6.2e-09 3.424e-07 1.293e-07 0.6630188 8.7e-09 1.28e-08 2.5e-08 7.7e-09 3.98e-08 0.03396965 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2225152 
## 
## solution.v:
##  0.03163678 5.98593e-05 0.06491217 2.3176e-06 0.223001 0.09232858 0.09280776 0.09009052 0.01043865 0.02065809 8.436e-07 0.195258 0.001523043 0.002040045 0.1752423 
## 
## solution.w:
##  3.2e-09 1.27e-08 0.2553924 2.683e-07 4.6e-09 0.1517434 1.75e-08 1.204e-07 9e-09 9.1e-09 1.19e-08 5.9e-09 1.738e-07 1.96e-08 2.05e-08 1.2e-08 3.1e-09 3.2e-09 1.41e-08 1.15e-08 5.7e-09 1.091e-07 2.241e-07 5.2e-09 2.3e-09 1.09e-08 4.3e-09 1.13e-08 1.224e-07 2.0233e-06 2.4e-09 1.39e-08 2.1e-09 0 0.197542 0.3953177 1.0967e-06 5.86e-08 7.4e-09 7e-10 1.2e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1637796 
## 
## solution.v:
##  0.001144612 0.00211928 0.1516032 0.003443474 0.002516987 0.006152524 0.1851146 0.003992902 0.08880627 0.03905725 0.0412265 0.1337259 0.09719566 0.07826197 0.1656389 
## 
## solution.w:
##  0.0001069113 0.0001056245 2.38942e-05 1.57238e-05 2.56807e-05 1.15108e-05 0.006792617 4.41467e-05 0.01675492 2.07024e-05 5.50075e-05 0.2311756 0.0001064537 1.0566e-05 0.170833 0.0002081047 6.70178e-05 1.223e-05 3.997e-05 1.44122e-05 0.3095644 2.3628e-05 6.49613e-05 2.15866e-05 1.17312e-05 0.02635088 5.7199e-05 1.1936e-05 0.1630386 1.15431e-05 4.27598e-05 0.07339673 4.13647e-05 3.44985e-05 9.7725e-06 0.0001450248 1.40832e-05 1.5587e-05 8.49121e-05 0.0006247076 9.9754e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10473291 
## 
## solution.v:
##  0.001578467 0.04316683 0.1005786 0.04529106 0.0002362581 0.06245736 0.08266047 0.0559163 0.001874062 0.1072435 0.07832788 0.1137228 0.232305 0.03725276 0.03738864 
## 
## solution.w:
##  0.005231141 1.0006e-06 1.69e-07 4.597e-07 1.0243e-06 3.599e-07 5.15e-07 7.538e-07 0.2034008 3.151e-07 1.4163e-06 1.2747e-06 5.456e-07 2.924e-07 1.9363e-06 4.1876e-06 5.784e-07 6.759e-07 5.757e-07 0.03231876 0.05965349 6.133e-07 6.04e-07 6.827e-07 1.331e-07 3.267e-07 1.1803e-06 4.646e-07 6.204e-07 2.938e-07 6.88e-07 1.4349e-06 8.805e-07 0.6993638 6.15e-08 3.423e-07 5.706e-07 3.667e-07 8.963e-07 4.4195e-06 1.4116e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 47501807 
## 
## solution.v:
##  0.0864277 0.1117948 0.01260155 0.1708173 0.1550968 0.002360174 0.007623491 2.48432e-05 0.009742286 0.03750431 0.1080104 0.09577696 0.06692437 0.03182426 0.1034707 
## 
## solution.w:
##  0.05964653 1.16156e-05 0.01133262 5.17e-06 2.6955e-06 3.735e-07 6.2015e-06 4.6e-07 3.988e-07 4.092e-07 1.8981e-06 3.164e-07 4.752e-07 5.957e-06 4.617e-07 3.692e-07 8.328e-07 0.03348089 2.407e-07 5.06e-08 1.3537e-06 5.67435e-05 1.95928e-05 3.2395e-06 3.003e-07 3.471e-07 1.738e-07 8.074e-07 2.543e-07 6.5e-09 0.212866 2.717e-07 3.801e-07 1.3892e-06 1.3e-09 0.0003529529 6.215e-07 0.6088347 0.0733618 1.156e-07 1.0007e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11501651 
## 
## solution.v:
##  0.2014909 0.0002617113 0.04163206 0.01378892 0.01989245 0.127353 0.02879363 0.1549424 0.0003298651 0.09981473 0.0004777852 0.1034322 0.02691642 0.00462382 0.1762501 
## 
## solution.w:
##  1.86033e-05 0.09699556 1.11606e-05 4.50768e-05 1.66003e-05 4.7941e-06 0.0695012 5.74356e-05 3.67313e-05 3.10959e-05 1.13667e-05 9.6493e-06 0.0002164018 1.7109e-05 1.96454e-05 2.58882e-05 1.67913e-05 9.9653e-06 1.9436e-05 0.3362475 9.24136e-05 7.902e-07 0.1650563 4.2446e-06 3.9288e-06 4.17104e-05 4.4476e-05 3.13735e-05 1.01721e-05 0.3284415 9.9572e-06 4.43981e-05 1.32826e-05 2.28883e-05 3.4726e-06 0.002816849 6.846e-06 8.8439e-06 3.04018e-05 1.34e-08 4.1375e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 87667053 
## 
## solution.v:
##  0.001504364 0.03674684 0.01727587 0.0381837 0.02647901 0.000331431 0.001801657 0.1165056 0.1237491 0.001316463 0.3421073 0.1821574 0.05700918 0.01369569 0.04113645 
## 
## solution.w:
##  2.4e-09 3.7e-09 5.1e-09 1.5e-08 3.8e-09 1.07e-08 4e-09 6.2e-09 4.1e-09 4.1e-09 4.6e-09 6e-09 1.5e-08 0.02920025 6.2e-09 4.2e-09 3.7e-09 9.4e-09 6.8e-09 3.5e-09 3.5e-09 3.34e-08 3.5e-09 7.4e-09 2.3e-09 0.4651261 8e-09 2e-09 5.4e-09 0.5056734 4.1e-09 8.2e-09 3.5e-09 2.2e-09 6e-09 5.9e-09 2.65e-08 5.1e-09 1.13e-08 7.5e-09 3.2e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 23246264 
## 
## solution.v:
##  0.0244891 5.2828e-06 0.1667293 0.09222723 0.03241258 0.003579958 0.1584099 0.05029706 0.001948867 8.49909e-05 0.01306584 0.1138699 0.02597542 0.008884614 0.30802 
## 
## solution.w:
##  5.94715e-05 1.0942e-06 8.229e-07 1.2754e-06 1.01983e-05 2.893e-07 4.1589e-06 7.016e-07 1.02e-08 9.668e-07 1.3537e-06 3.6485e-06 1.1174e-06 3.4035e-06 9.154e-07 2.0494e-06 0.0002167525 3.73e-08 1.175e-06 8.494e-07 0.3079923 8.819e-07 4.8741e-06 4.813e-07 1.268e-07 3.44e-07 2.0779e-06 0.001123462 0.3326395 9.204e-07 5.322e-07 7.014e-07 0.283727 0.0447157 6.066e-07 0.02947718 5.196e-07 4.219e-07 1.3833e-06 4.074e-07 2.994e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 25499454 
## 
## solution.v:
##  0.01291727 0.126755 0.01386864 0.2052897 1.2638e-06 0.1029559 0.001176681 0.001898771 0.003720979 0.001358496 0.002170888 0.0550527 0.2368013 0.1978533 0.03817909 
## 
## solution.w:
##  4.7206e-06 4.3194e-06 2.6779e-06 3.5886e-06 5.8794e-06 0.08937125 6.1814e-06 0.001028144 1.06908e-05 0.06904276 7.968e-06 0.3274324 0.09595845 3.2722e-06 2.55152e-05 1.16732e-05 3.3286e-06 3.543e-06 4.7321e-06 0.3010953 6.8879e-06 4.3104e-06 2.4894e-06 4.8709e-06 8.9057e-06 0.0002228874 6.7354e-06 5.5682e-06 2.8856e-06 4.9806e-06 3.2658e-06 2.2032e-06 1.32799e-05 5.2055e-06 0 3.5869e-06 1.65e-06 6.4465e-06 5.286e-06 0.1156586 3.4686e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8341073 
## 
## solution.v:
##  0.02407552 0.08581982 0.03212275 0.04715419 0.007929465 0.1018866 0.0002854869 0.0001152293 0.005896084 0.01276957 0.1968085 0.1199283 0.03468847 0.07264707 0.2578729 
## 
## solution.w:
##  0.0003200919 1.1183e-06 9.144e-07 2.594e-07 4.3625e-05 1.473e-07 3.222e-07 5.007e-07 9e-10 3.394e-07 4.893e-07 3.862e-07 0.02249188 1.803e-07 2.6892e-06 0.6205173 6.892e-07 6.176e-07 1.1416e-06 4.372e-07 2.931e-07 2.621e-07 1.1253e-06 3.625e-07 0.1200113 2.882e-07 5.124e-07 1.57e-08 1.0207e-06 2.632e-07 1.461e-07 8.734e-07 3.658e-07 2.3238e-06 0.2365768 1.80085e-05 3.339e-07 1.0857e-06 4.286e-07 9.629e-07 1.353e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11233539 
## 
## solution.v:
##  0.03922744 0.01394059 0.05041845 0.1783045 3.51319e-05 0.03683311 0.08155935 1.94158e-05 0.01514576 0.003781816 0.07826093 0.1355252 0.1363964 0.08104539 0.1495065 
## 
## solution.w:
##  2.99264e-05 0.03225572 0.2999308 1.88903e-05 3.80746e-05 1.1208e-05 5.94428e-05 3.35109e-05 5.0386e-06 0.0001842014 5.4822e-05 1.62222e-05 1.53142e-05 6.6171e-06 1.36401e-05 1.83261e-05 0.0001176294 1.1859e-05 5.47652e-05 1.07254e-05 3.98208e-05 1.23879e-05 0.0002949354 3.66139e-05 2.52903e-05 1.04878e-05 1.06121e-05 0.6177641 2.31214e-05 1.08488e-05 6.9493e-06 6.7824e-05 1.68172e-05 3.30027e-05 0.001205309 0.0002069329 1.55845e-05 1.12758e-05 1.00904e-05 1.03563e-05 0.04730088 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 324066990 
## 
## solution.v:
##  0.05219516 0.004286998 0.001827306 0.01903205 0.08748642 0.0002703955 0.1032198 0.02715217 0.06745399 0.0234615 0.1918995 0.1120886 0.008984966 0.002038826 0.2986023 
## 
## solution.w:
##  6.1e-09 2.6e-09 2.78e-08 6.5e-09 1.01e-08 0.4464855 3e-09 5.8e-09 1.44e-08 5.1e-09 3.4e-09 1.93e-08 3.3e-09 6.7e-09 5.9e-09 1.17e-08 6.7e-09 8.6e-09 1.1e-08 1.9e-09 5.1e-09 2.1e-09 3.1e-09 1.46e-08 0.5535141 6.4e-09 4.9e-09 1.27e-08 1.65e-08 1.9e-09 3.8e-09 1.87e-08 6.1e-09 2.16e-08 1.37e-08 6.5e-09 1.14e-08 3.73e-08 2.9e-09 1.9e-09 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5394645 
## 
## solution.v:
##  0.06991774 0.0004588761 0.08776444 0.01684438 0.0197097 0.001593735 0.08117353 0.1723498 0.02555069 0.005341299 0.03619128 0.1648977 0.1029974 0.09284729 0.1223621 
## 
## solution.w:
##  1.7e-08 0.1793442 0.06002365 1.15635e-05 3.6712e-06 3.9243e-06 2.0115e-05 7.1791e-06 0.0001223138 1.00088e-05 3.0723e-06 6.3717e-06 0.1450583 6.3318e-06 3.9449e-06 6.5419e-06 0.009711093 0.05337301 1.66803e-05 1.4874e-06 0.3953836 5.5911e-06 5.155e-07 8.8994e-06 2.8677e-06 1.7754e-05 0.0005192417 4.4849e-06 6.0457e-06 2.34415e-05 1.71679e-05 0.1556882 3.8985e-06 3.5422e-06 1.366e-07 9.2121e-06 3.175e-06 5.1424e-06 0.0005596194 2.1156e-06 2.0077e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28295253 
## 
## solution.v:
##  0.02909911 0.000221973 0.004232706 0.07922348 0.006136548 0.1530781 0.0001428836 0.1110388 0.00585703 0.02684699 0.1824126 0.01040101 0.04283418 0.143614 0.2048606 
## 
## solution.w:
##  7.74e-08 9.71e-08 3.67e-08 3.858e-07 3.22e-08 0.06304296 8.919e-07 6.91e-08 4.01e-08 5.26997e-05 2.6e-07 7.6e-08 6.96e-08 0.6449399 8.1e-08 3.85e-08 1.452e-07 1.0651e-05 3.71e-08 6.4454e-06 9.565e-07 4.7191e-06 3.538e-07 1.5001e-06 1.942e-07 0 7.05e-08 4.3e-08 1.218e-07 2.91e-08 0 9.78e-08 1.476e-07 1.19e-08 3.8e-08 0.2915689 9.81e-08 5.29e-08 8.09e-08 1.1395e-06 0.0003664496 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 31375946 
## 
## solution.v:
##  0.0965166 0.006141324 0.001476207 0.04778847 0.03622134 0.07950184 0.02802372 0.0761237 0.004969795 0.0006929314 0.1008018 0.1639561 0.1384929 0.2081401 0.01115321 
## 
## solution.w:
##  4.686e-07 1.5068e-06 0.5130643 5.5624e-06 9.484e-07 4.7935e-06 2.9015e-06 2.3254e-06 2.3e-09 1.2188e-06 1.9839e-06 1.6294e-06 4.0901e-06 2.6603e-06 0.1099643 1.3263e-06 9.834e-07 2.8073e-06 1.9774e-06 1.0327e-06 1.9432e-06 1.40466e-05 1.4892e-06 7.9575e-06 1.1667e-06 0.004854466 2.6004e-06 3.061e-07 0.001848956 2.3496e-06 5.3504e-06 1.4751e-06 2.1657e-06 1.251e-07 0 0.2182919 5.3575e-06 2.17189e-05 4.2771e-06 1.2198e-06 0.1518643 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 341033.2 
## 
## solution.v:
##  0.04096106 0.06800126 0.03247855 7.40093e-05 0.1835057 0.001633946 0.0785025 0.06484308 0.002068651 0.001936563 8.77571e-05 0.1010837 0.1254938 0.1488484 0.1504809 
## 
## solution.w:
##  0.08016045 0.0003402422 8.5593e-06 2.6414e-05 7.0557e-06 4.5203e-06 0.2720382 7.3741e-06 0.02544596 6.5413e-06 1.17372e-05 4.59493e-05 7.1194e-06 5.2692e-06 1.5157e-06 2.03514e-05 8.536e-06 0.1214052 1.5493e-05 1.629e-07 1.27644e-05 0.1174352 2.0372e-06 9.94307e-05 1.99644e-05 5.9436e-06 0.0003124898 9.8933e-06 0.0004740081 1.18074e-05 2.12567e-05 1.37016e-05 1.55482e-05 6.121e-06 6.122e-06 5.9096e-06 1.71141e-05 7.5957e-06 2.36229e-05 0.3816192 0.0003134734 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21483386 
## 
## solution.v:
##  0.005781918 0.03896496 0.03766826 0.0001423766 0.1282859 0.04929598 0.02828723 0.190138 0.07451115 0.1386312 0.139228 0.03010588 0.1011564 0.03763675 0.0001660755 
## 
## solution.w:
##  1.1005e-06 0.1397814 3e-08 2.97e-08 6.7e-08 2.49e-08 7.23e-08 5e-08 2.237e-07 8.92e-08 1.675e-07 1.581e-07 8.2e-08 2.45e-08 3.70426e-05 1.741e-07 8.55e-08 1.71e-07 5.56e-08 0.0003811622 1.163e-07 -1e-10 5.96e-08 2.043e-07 2.29697e-05 2.84e-08 1.617e-07 8.31e-08 8.53e-08 1.91e-08 1.15e-08 6.03e-08 8.57e-08 6.49e-08 3.53e-08 5.05e-08 4.79e-08 7.86e-08 8.7e-08 0.8094394 0.05033414 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54208487 
## 
## solution.v:
##  0.01186003 0.03084354 0.00936093 0.1597236 0.002721219 0.05543795 0.09324729 0.01518554 0.008122365 0.001647758 0.005130138 0.201611 0.2351861 0.1687401 0.001182409 
## 
## solution.w:
##  2.85e-08 3.28e-08 1.76e-08 1.75e-08 1.59e-08 0.8576397 4e-09 3.5e-09 5.1e-09 9e-10 3e-08 1.64e-08 1.9e-09 2.94e-08 1.19e-08 7.1e-09 5.3e-09 3.05e-08 5.44e-08 4.9e-09 2e-09 4.59e-08 6.5e-09 7.74e-08 0.1423593 1.3e-09 9e-09 1.49e-08 1.991e-07 1.39e-08 3.21e-08 1.95e-08 3.3e-09 1.98e-08 1.9e-08 0 1.7e-09 7.73e-08 1.484e-07 1.54e-08 1.21e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_looid <- mspe.test(placebos_looid, discard.extreme = FALSE)

mspe_test_looid$p.val
## [1] 0.1395349

LOO 4: NV

Prepare Data (LOO NV)

ds_state_slim_loonv <- ds_state_slim %>% filter(state != "NV")


ds_state_slim_loonv <- ds_state_slim_loonv %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "HI" ~ 7,
             state == "IA" ~ 8,
             state == "ID" ~ 9,
             state == "IL" ~ 10,
             state == "IN" ~ 11,
             state == "KS" ~ 12,
             state == "KY" ~ 13,
             state == "LA" ~ 14,
             state == "MD" ~ 15,
             state == "ME" ~ 16,
             state == "MI" ~ 17,
             state == "MO" ~ 18,
             state == "MS" ~ 19,
             state == "MT" ~ 20,
             state == "NC" ~ 21,
             state == "ND" ~ 22,
             state == "NE" ~ 23,
             state == "NH" ~ 24,
             state == "NJ" ~ 25,
             state == "NM" ~ 26,
             state == "NY" ~ 27,
             state == "OH" ~ 28,
             state == "OK" ~ 29,
             state == "OR" ~ 30,
             state == "PA" ~ 31,
             state == "RI" ~ 32,
             state == "SC" ~ 33,
             state == "SD" ~ 34,
             state == "TN" ~ 35,
             state == "TX" ~ 36,
             state == "UT" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))

data_prep_out_loonv <- dataprep(
  foo = ds_state_slim_loonv,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013:2018, c("mean"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_loonv$state_id[ds_state_slim_loonv$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO NV)

synth_out_loonv <- synth(
  data.prep.obj = data_prep_out_loonv)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21497322 
## 
## solution.v:
##  0.007494616 0.001802916 0.03370808 0.171938 0.2008558 2.06e-05 0.11438 4.7499e-06 0.009958603 0.03939075 0.0316749 0.3887709 
## 
## solution.w:
##  3.945e-07 2.049e-07 0.2049474 4.515e-07 3.45438e-05 0.3818615 3.259e-07 2.1142e-06 0.0001479242 3.841e-07 2.98421e-05 3.834e-07 7.346e-07 1.8508e-06 1.7581e-06 3.055e-07 1.2015e-06 8.07568e-05 7.33e-07 9.154e-07 4.224e-07 8.741e-07 1.127e-07 6.5424e-06 7.006e-07 0.09742234 2.98e-07 3.7723e-06 3.296e-07 4.103e-07 1.618e-07 2.66322e-05 1.0281e-06 5.46441e-05 0.001354778 0.3140108 1.3344e-06 8.351e-07 9.9e-08 1.298e-07 3.73e-08 6.72e-08
synth_AZ_median_contributions_loonv <- as.numeric(data_prep_out_loonv$Y0 %*% synth_out_loonv$solution.w)

Hypothesis Testing (LOO NV)

placebos_loonv <- generate.placebos(
  dataprep.out = data_prep_out_loonv,
  synth.out = synth_out_loonv,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17798906 
## 
## solution.v:
##  0.08944063 0.2827201 0.0006430968 0.0001089751 0.04764761 0.000351279 0.2803375 0.001519284 0.000159868 0.005424992 0.0008977728 0.2907489 
## 
## solution.w:
##  0.2745558 0.0001271437 0.0001141322 0.00408649 3.49479e-05 1.72195e-05 0.0001676465 0.0001938766 0.0003618731 0.0004179614 0.002605347 0.0001821624 0.0004281618 0.0001325196 0.001448674 0.0004084945 0.07929916 0.000732481 0.0002099779 6.96605e-05 0.1551673 0.0002788998 0.04191759 0.006540871 0.0001501791 0.0002194417 0.005069274 0.0003778115 0.0001261939 7.26343e-05 0.0004435709 0.0001993306 0.08680627 0.000985853 2.65159e-05 0.0003042589 0.00023791 0.0002560963 0.0004263448 0.3345722 0.0002276878 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 35372014 
## 
## solution.v:
##  0.02066203 0.6370973 0.0623756 0.000416862 0.1132126 0.02497078 0.07785397 0.01057188 3.9823e-06 2.69731e-05 2.3556e-06 0.05280564 
## 
## solution.w:
##  3.61891e-05 1.518e-07 6.13e-08 1.454e-07 4.33e-08 1.008e-07 4.29e-08 1.571e-07 1.0328e-06 1.031e-07 1.216e-07 2.234e-07 1.815e-07 4.45e-08 2.526e-07 1.3073e-06 2.143e-07 6.69e-08 0.06768205 6.89e-08 1.077e-07 0 0.09911986 5.41e-08 1.296e-07 4.05642e-05 3.37e-07 7.65e-08 0.5916443 2.56e-08 1.399e-07 1.457e-07 2.408e-07 2.112e-07 6.83e-08 4.665e-07 4.18e-08 9.33e-08 1.3e-07 0.2414704 2.53e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3650828 
## 
## solution.v:
##  0.166676 0.1278129 0.05529101 0.004887089 0.05245715 0.09383651 0.05762439 0.08661857 0.1573658 9.4873e-05 0.02385788 0.1734778 
## 
## solution.w:
##  1.76477e-05 2.85364e-05 5.54681e-05 2.14264e-05 0.08780123 2.89007e-05 0.1611258 7.48409e-05 1.86693e-05 4.78441e-05 1.93109e-05 4.89314e-05 1.58595e-05 6.4304e-06 1.24166e-05 2.00303e-05 0.000106891 1.0918e-05 0.0001456562 6.9934e-06 2.00837e-05 1.39511e-05 0.03561844 3.72935e-05 0.2268576 2.40297e-05 2.12424e-05 2.53697e-05 2.55165e-05 2.525e-07 0.002433048 1.62817e-05 5.56e-08 0.2893249 0.1957731 0.0001166155 1.04751e-05 4.05039e-05 1.1567e-05 5.0933e-06 1.09251e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5970798 
## 
## solution.v:
##  0.0163974 0.005016912 0.0743573 1.37043e-05 0.03910282 0.01875784 0.0105298 0.0461898 0.05054374 0.1885238 0.395426 0.1551408 
## 
## solution.w:
##  1.436e-07 2.206e-07 4.05e-07 2.017e-07 1.08418e-05 0.1351807 2.525e-07 8.459e-07 3.5e-07 5.92131e-05 2.99e-07 3.42e-07 1.987e-07 0.2979732 2.436e-07 2.98e-07 2.264e-07 1.937e-07 2.385e-07 0.2969124 0.02933152 6.216e-07 2.824e-07 2.655e-07 0.01727101 2.968e-07 2.717e-07 3.326e-07 3.704e-07 0.1360567 1.937e-07 9.088e-07 1.293e-07 2.649e-07 0.08663915 6.2e-09 0.0005536638 7.691e-07 2.178e-07 1.706e-07 2.043e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5318779 
## 
## solution.v:
##  0.1308538 1.3402e-06 0.1006515 0.08990812 0.1703442 0.0009052793 0.04213834 0.07653629 1.5262e-06 0.002060462 0.0005816733 0.3860175 
## 
## solution.w:
##  0.07334455 1.43588e-05 1.55499e-05 9.5084e-06 0.0001087071 8.3936e-06 0.05355165 1.02714e-05 5.1874e-06 8.3749e-06 8.1014e-06 6.3521e-06 1.32127e-05 0.1623235 1.18144e-05 7.383e-06 9.9084e-06 1.40791e-05 1.30152e-05 7.2897e-06 6.6305e-06 0.01803046 0.02571784 5.14561e-05 1.19368e-05 6.3584e-06 1.71439e-05 0.000170099 1.07733e-05 6.2491e-06 5.8233e-06 6.371e-06 0.2215585 0.4448479 4.0331e-06 7.6612e-06 1.97142e-05 1.69748e-05 8.7464e-06 1.155e-06 2.8527e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 31663462 
## 
## solution.v:
##  0.006422575 0.00276718 0.00991287 0.007281689 0.0002983445 0.2353432 0.0001434112 0.1587305 4.01824e-05 0.01547588 0.0001271694 0.563457 
## 
## solution.w:
##  3.7019e-06 2.5121e-06 9.46521e-05 4.4178e-06 1.14986e-05 2.7053e-06 6.5526e-06 8.3637e-06 3.3854e-06 4.4781e-06 3.5293e-06 7.8722e-06 1.8095e-06 7.1061e-06 3.2746e-06 3.4642e-06 4.3777e-06 3.1116e-06 6.6222e-06 1.1334e-06 4.687e-06 2.7515e-06 2.2888e-06 4.33744e-05 0.2485381 3.1635e-06 1.33392e-05 6.438e-06 2.5915e-06 7.0408e-06 9.1434e-06 2.8273e-06 1.95667e-05 7.81659e-05 0.1948665 2.7699e-06 5.31e-07 3.65735e-05 2.4437e-06 1.4045e-06 0.5561718 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056883 
## 
## solution.v:
##  6.15798e-05 1.61805e-05 0.2863763 7.228e-05 0.002095879 1.72345e-05 0.001861079 0.0002237478 0.07046932 2.63898e-05 0.1245604 0.5142195 
## 
## solution.w:
##  4.06e-08 1.88e-08 1.5e-08 5.68e-08 2.68e-08 4.9e-09 2.07e-08 2.34e-08 2.73e-08 2.99e-08 3.65e-08 2.83e-08 5.63e-08 5.54e-08 3.81e-08 2.74e-08 4.49e-08 4.24e-08 2.39e-08 6.78e-08 3e-10 1.173e-07 0.9999986 2.84e-08 1.04e-08 4.86e-08 2.54e-08 2.49e-08 6.01e-08 3.27e-08 3.76e-08 4.25e-08 1.76e-08 2.22e-08 1.1e-09 5.78e-08 2.22e-08 1.22e-08 1.218e-07 7.1e-08 1.09e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 42512562 
## 
## solution.v:
##  0.003951853 0.1342487 0.008294405 0.03013098 0.01888469 0.01191209 0.00232671 0.283568 0.1166339 0.1341566 0.06485128 0.1910408 
## 
## solution.w:
##  5.779e-07 1.6114e-06 0.317573 0.002421742 5.665e-07 9.98e-08 1.779e-06 9.821e-07 4.495e-07 2.0561e-06 1.3191e-06 1.1634e-06 6.83e-07 0.00119361 5.876e-07 5.475e-07 3.121e-06 1.3034e-06 3.405e-07 6.027e-07 7.82e-07 4.3967e-06 0.0006414554 1.7408e-06 3.332e-07 9.107e-07 4.007e-07 1.09824e-05 2.0889e-06 0.02628888 0.3670303 5.502e-07 1.668e-07 1e-09 0.2505661 1.1391e-06 3.7166e-06 9.737e-07 9.266e-07 7.452e-07 0.03423724 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 33219065 
## 
## solution.v:
##  0.006451699 1.09281e-05 0.04025401 0.1170557 0.1776468 0.015877 0.001889305 0.1513569 0.04905325 0.05990632 0.07162567 0.3088724 
## 
## solution.w:
##  9.9078e-06 1.14686e-05 0.0001115636 3.33087e-05 4.1722e-06 0.0628815 2.65752e-05 1.01979e-05 5.43727e-05 0.06368053 1.85736e-05 0.001863625 2.53826e-05 7.17e-08 4.0544e-05 0.0004861408 0.01815878 7.817e-06 2.30966e-05 0.1899129 3.52335e-05 1.51115e-05 1.70726e-05 4.9399e-05 0.3968259 5.68116e-05 0.000175069 1.53814e-05 0.0001090152 0.0001944634 3.5664e-05 0.0003904216 0.0001865327 0.2644436 6.601e-07 1.36927e-05 7.1285e-06 2.5734e-05 2.16137e-05 2.07056e-05 3.107e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1088579 
## 
## solution.v:
##  0.07375962 0.003783998 0.003113861 0.01166427 0.1316693 0.03757211 0.003821572 0.03890693 0.08501886 0.09067888 0.2660409 0.2539697 
## 
## solution.w:
##  0.0001240525 0.0008187348 9.43114e-05 0.001754249 3.54588e-05 9.40966e-05 0.003686672 4.07278e-05 7.01524e-05 0.0001105513 0.0001560546 0.0001994212 8.116e-06 9.91502e-05 0.0004760916 0.7346367 3.34615e-05 8.42201e-05 9.76841e-05 2.0829e-05 0.006982047 0.0002170713 3.13359e-05 6.25381e-05 0.0001448979 0.0008707691 0.0003370192 0.0001583291 4.98056e-05 0.0002438035 4.55016e-05 0.001955005 1.17672e-05 8.5907e-05 0.0001077361 0.07990963 9.00448e-05 0.02531351 0.0009087449 1.252e-07 0.1398336 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 78899954 
## 
## solution.v:
##  0.0005666765 0.09239629 0.03392702 0.008211864 0.03459209 3.42783e-05 0.1449356 0.001196202 0.0007121955 0.003475977 0.3383141 0.3416377 
## 
## solution.w:
##  6.9e-09 5.32e-08 6.048e-07 5.2929e-06 1.5736e-06 7.1535e-06 6.765e-07 3.23e-08 0.0001397103 2.598e-07 6.484e-07 5.856e-07 1.11704e-05 4.17362e-05 6.573e-07 7.519e-07 0.5718355 4.369e-07 3.882e-07 3.7949e-06 0.3950928 1.5933e-06 0.03251439 5.489e-07 0.0002871643 1.1674e-06 1.076e-07 1.16e-07 1.45912e-05 4.2975e-06 7.7e-08 2.42823e-05 1.1016e-06 1.251e-07 2.989e-07 2.38e-06 2.5228e-06 1.56e-07 7.514e-07 5.178e-07 6.2e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5939884 
## 
## solution.v:
##  0.1695582 0.009377669 0.05290137 0.1751696 0.1571224 0.05982835 0.01179557 0.05023334 0.01779439 0.00026057 0.01820459 0.277754 
## 
## solution.w:
##  0.2535636 0.04701283 7.5325e-06 1.40771e-05 1.31049e-05 9.0454e-06 0.2936947 5.5855e-06 1.23495e-05 7.7911e-06 6.92742e-05 1.61483e-05 4.8614e-06 1.20967e-05 1.14561e-05 1.24844e-05 1.965e-07 4.5442e-06 1.52e-05 0.1618078 3.96645e-05 0.06096345 9.68945e-05 1.85251e-05 4.3585e-06 1.26957e-05 3.76433e-05 4.9385e-06 0.1134298 0.0006709891 1.42948e-05 2.88254e-05 3.39903e-05 3.17851e-05 7.155e-07 6.2345e-06 1.64642e-05 5.311e-06 8.8048e-06 2.2896e-06 0.06827765 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 49114007 
## 
## solution.v:
##  0.07576396 0.05922363 0.009389224 0.4580115 0.2012672 7.23597e-05 0.02507651 0.00144685 0.01603908 0.006627315 0.001052663 0.1460298 
## 
## solution.w:
##  1.5337e-06 1.104e-07 0.01985218 3.651e-07 6.553e-07 9.843e-07 2.088e-06 2.5e-07 6.665e-07 0.1031945 1.0637e-06 8.586e-07 2.717e-07 1.786e-07 6.383e-07 1.7126e-06 5.336e-07 2.826e-07 0.140648 7.93e-08 2.1891e-06 2.994e-07 5.936e-07 2.6161e-06 7.237e-07 0.5096305 3.5972e-06 2.226e-07 2.068e-07 9.09e-08 0.06601709 6.405e-07 9.271e-07 4.3266e-06 0.1606085 2.1835e-06 2.372e-07 1.7335e-05 4.856e-07 1.24e-07 2.712e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 24585252 
## 
## solution.v:
##  0.194206 6.542e-07 0.07758386 2.789e-07 0.1803433 0.1142756 0.0881424 0.001874876 0.002341966 0.07948187 0.01063541 0.2511138 
## 
## solution.w:
##  4.0408e-06 1.36e-08 1.94771e-05 2.19356e-05 2.12198e-05 9.5607e-06 4.3123e-06 0.1184177 4.11994e-05 0.000195185 5.758e-06 5.0791e-06 1.48966e-05 2.99941e-05 4.93992e-05 0.0001926082 8.3793e-06 9.22063e-05 8.80185e-05 0.08090149 5.6811e-06 7.2935e-06 1.434e-07 4.2941e-06 3.18e-07 3.97436e-05 1.66094e-05 6.70567e-05 0.1252544 0.0003409335 1.07782e-05 3.98605e-05 0.000107938 1.11906e-05 6.84933e-05 0.6243809 9.224e-06 3.83639e-05 3.80006e-05 0.04943518 1.1547e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4478603 
## 
## solution.v:
##  0.1619336 0.0467512 0.000622304 0.06321706 0.04940565 0.0001398258 0.2863327 0.07152408 0.0001527985 0.005188276 9.31033e-05 0.3146393 
## 
## solution.w:
##  5.51e-08 8.48e-08 1.5951e-06 1.07506e-05 7.189e-07 0.0001145874 3.9e-09 1.01607e-05 2.8e-06 1.64e-08 0.1566597 7.59e-08 2.053e-07 6.051e-07 8.32e-08 1.445e-07 3.0691e-06 8.346e-07 6.673e-07 9.6e-09 5.04e-08 1e-10 0.2372404 2.784e-07 3.3987e-06 1.238e-07 1.748e-07 6.965e-07 6.072e-07 0.001474026 2.786e-06 2.709e-07 3.405e-07 6.62e-07 2.824e-06 7.745e-07 0.6044659 2.99e-07 7.01e-08 3.47e-08 1.378e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 39471551 
## 
## solution.v:
##  0.08547239 0.01499469 0.09402862 0.1436918 0.1589707 0.01271573 0.1217665 0.05544912 0.002039134 0.000532438 0.003912361 0.3064266 
## 
## solution.w:
##  0.1104224 0.0001784289 5.3e-07 6.378e-07 1.0111e-06 5.829e-07 7.285e-07 4.261e-07 5.999e-07 0.3536314 3.36e-07 5.2774e-06 7.339e-07 5.047e-07 3.645e-07 1.3697e-06 3.315e-07 4.088e-07 6.63e-07 2.56e-08 6.445e-07 0.1602497 4.108e-07 8.922e-07 0.05369217 1.2367e-06 1.3627e-06 7.86e-07 1.0866e-06 1.2403e-06 3.691e-07 7.793e-07 1.6338e-06 6.91e-07 2.88e-07 3.438e-07 7.024e-07 0.1182304 3.18e-08 0.2035537 1.48737e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13684171 
## 
## solution.v:
##  0.02859464 2.5538e-06 0.0004447243 0.2301299 5.8673e-06 4.0139e-05 0.0183292 0.2586015 0.3958727 0.003907606 4.58454e-05 0.06402532 
## 
## solution.w:
##  0.0005284548 0.002387531 0.0001203699 0.0002246301 0.0004366797 7.16374e-05 0.0003410746 0.0005894452 1.08e-08 0.445218 0.0001394832 0.0003783017 0.0002913838 0.197082 0.0001298829 0.0004029938 0.001487155 0.0001745954 0.000478031 0.0002113361 0.0002101661 0.0002420892 0.000706782 0.0001250529 5.53989e-05 0.001138897 0.0004423674 0.0002450771 0.001410515 0.0002322952 0.0003772408 0.0001877835 0.2584673 3.004e-07 7.69225e-05 0.0005640194 8.92647e-05 0.0001355092 0.0007518828 0.08369723 0.0001509614 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 17066178 
## 
## solution.v:
##  0.07124911 1.7662e-06 0.0002561827 0.2243955 0.002331417 0.1179821 0.2001168 0.004533317 0.1006731 0.0163615 0.08823872 0.1738604 
## 
## solution.w:
##  0.2377297 3.897e-07 1.816e-07 1.141e-07 3.199e-07 6.44e-08 1.917e-07 3.573e-07 2.331e-07 1.496e-07 0.2371011 2.114e-07 4.583e-07 1.589e-07 8.29e-08 2.15e-07 5.424e-07 2.375e-07 2.462e-07 1.26492e-05 1.1806e-06 9.68e-08 2.926e-07 1.9e-07 2.95e-08 2.737e-07 0.1938819 2.096e-07 1.242e-07 6.89e-08 5.09105e-05 1.861e-07 4.347e-07 6.629e-07 1.099e-07 2.244e-07 6.93e-08 1.447e-07 1.912e-07 0.3312149 1.464e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21720753 
## 
## solution.v:
##  6.826e-07 0.1207572 0.03749436 0.1212091 0.05067359 6.9652e-06 0.002185399 0.01951235 0.4287574 0.04570822 0.1317436 0.04195119 
## 
## solution.w:
##  1.31326e-05 7.1491e-06 6.1203e-06 8.6684e-06 2.11027e-05 6.5716e-05 1.81713e-05 7.6796e-06 6.1247e-06 7.96174e-05 6.5535e-06 1.27336e-05 1.1142e-05 0.0003315342 0.1829191 0.000166777 1.95804e-05 4.7012e-06 9.9174e-06 0.1020107 0.002170373 1.58797e-05 1.8009e-06 0.2397396 9.6346e-06 1.80883e-05 2.32285e-05 5.355e-07 3.7123e-06 1.712e-06 8.628e-06 2.83575e-05 6.87065e-05 1.22088e-05 3.29248e-05 3.06693e-05 0.0004928764 5.00495e-05 0.001114359 0.1619463 0.308504 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1688656 
## 
## solution.v:
##  0.003707817 0.0132443 0.000103724 0.01778261 0.05870513 0.3104918 0.3014112 0.03198491 0.01324125 0.006627222 0.001384538 0.2413155 
## 
## solution.w:
##  2.91e-08 0.2250812 3.82e-08 0.0001588084 1.66515e-05 4.85066e-05 5.19426e-05 0.2707905 0.0001089707 0.1201278 6.75165e-05 5.68214e-05 0.00261953 3.71564e-05 8.76481e-05 2.04044e-05 0.0002902695 0.0001063037 1.81964e-05 3.61047e-05 4.09571e-05 4.29931e-05 8.97457e-05 1.02649e-05 4.31742e-05 0.0001264514 5.598e-05 1.08971e-05 0.0002657413 0.002057782 0.07113885 0.0001679218 0.09330085 0.08125874 0.1005717 0.000712008 3.28048e-05 1.57581e-05 2.88471e-05 1.9053e-05 0.03028515 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 65484240 
## 
## solution.v:
##  0.008524124 1.22433e-05 2.6325e-06 9.1521e-06 0.02557484 0.0003882358 0.3610527 0.02382302 8.9012e-06 0.09535915 0.02239421 0.4628508 
## 
## solution.w:
##  1.008e-07 9.782e-07 4.74e-08 0.0001884931 5.67e-08 4.23e-08 0.3619124 1.679e-07 8.02e-08 2.234e-07 7.5e-08 2.71e-07 9.7e-08 7.3e-08 2.519e-07 1.169e-07 1.679e-07 6e-08 1.14e-07 1.218e-07 2e-10 6.57e-07 8.06e-08 4.11e-08 4.63e-08 1.245e-07 1.013e-07 1.175e-07 0.4366817 0 5.57e-08 0.2011808 4.63e-08 5.99e-08 2.14e-08 8.8e-08 1.143e-07 7.94e-08 2.009e-07 3.10248e-05 6.647e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 38238350 
## 
## solution.v:
##  0.001020602 0.03295065 0.05797857 0.1795847 0.1773468 0.05254913 0.004236147 0.1176393 0.01372825 0.01442569 0.1025855 0.2459546 
## 
## solution.w:
##  1.661e-07 3.5311e-06 1.6402e-06 3.8853e-06 3.471e-06 1.08227e-05 0.5028254 1.2101e-06 5.1829e-06 8.48912e-05 0.3024236 6.9071e-06 2.18071e-05 2.4199e-06 6.7263e-06 7.1984e-06 1.04016e-05 5.5466e-06 0.02866495 2.5382e-06 1.73001e-05 2.2449e-06 2e-10 0.03390492 4.448e-07 9.4035e-06 0.1318185 2.6871e-06 1.8864e-06 1.0977e-06 2.9549e-06 4.68892e-05 4.3419e-06 3.219e-07 6.091e-07 2.8191e-06 5.2094e-06 1.6271e-06 1.05734e-05 8.9435e-06 6.48798e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30011088 
## 
## solution.v:
##  0.1136733 0.1225539 0.02601422 0.1376854 0.1694381 0.0128937 1.66872e-05 0.04259671 0.001142526 0.02914392 1.5102e-06 0.3448401 
## 
## solution.w:
##  7.618e-07 1.593e-06 5.926e-07 0.2527851 4.68e-07 7.991e-07 0.487657 3.359e-07 5.523e-07 7.884e-07 6.775e-07 2.2683e-06 8.881e-07 7.872e-07 1.5172e-06 1.7674e-06 5.57e-07 4.203e-07 9.675e-07 5.29e-07 5.713e-07 8.287e-07 3.981e-07 1.7547e-06 1.0937e-06 1.5911e-06 4.153e-07 1.0867e-06 2.202e-06 0.0001391227 4.618e-07 9.426e-07 1.57e-07 3.545e-07 3.492e-07 8.879e-07 0.01489518 1.0588e-06 0.007704848 0.1690226 0.06776574 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18039920 
## 
## solution.v:
##  0.004952386 0.0002441006 0.2676595 4.74519e-05 0.01649153 0.005706332 0.0007769515 0.004927629 0.03505597 0.0001944483 0.03496357 0.6289801 
## 
## solution.w:
##  2.6e-09 0.0003957636 7.52e-08 1.107e-07 1.749e-07 1.75e-08 0.8605132 3.1e-08 6.829e-07 2.571e-07 0.00417349 4.957e-07 1.95e-07 5.792e-07 3.43e-08 2.645e-07 6.417e-07 1.11638e-05 3.2e-08 1.692e-07 1.1237e-06 1.294e-07 1.239e-07 4.93e-08 4.41e-07 5.224e-07 4.441e-07 3.52e-08 1.07426e-05 2.308e-07 8.16e-08 4.798e-07 3.013e-07 2.589e-07 3.4e-09 0.1348869 3.92e-08 3.91e-08 1.688e-07 4.45e-07 1.19e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 92572896 
## 
## solution.v:
##  0.01253638 0.1411719 0.0775451 0.02245228 0.05490774 0.1168695 0.1346305 0.1389297 0.03399518 0.2307054 0.01045556 0.02580073 
## 
## solution.w:
##  4.77e-08 1.949e-07 5.774e-07 1.039e-07 9.243e-07 1.05799e-05 3.042e-07 3e-10 2.513e-07 1.4e-07 6.66e-07 5.631e-07 5.833e-07 1.63e-07 1.123e-07 9.246e-07 1.837e-07 6.88e-08 0.2187573 1.633e-07 9.65e-08 3.689e-07 3.939e-07 2.629e-07 1.271e-07 2.535e-07 2.082e-07 2.5573e-06 6.35e-08 1.09e-08 0.514105 1.293e-07 2.266e-07 2.058e-07 0.101509 9.97e-08 0.001368854 8.747e-07 3.403e-07 0.05821134 0.1060257 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2738767 
## 
## solution.v:
##  0.09058482 0.06991385 0.04583593 0.05915735 0.1725143 0.1148213 0.05301305 0.07833731 0.00282914 0.0004116718 0.000170329 0.3124109 
## 
## solution.w:
##  6.1e-09 6.4e-09 2.96e-08 1.3e-08 6.47e-08 0.2215462 7.6e-09 2.8e-09 8.86e-08 1.41e-08 3.25e-08 8.2e-09 3.9e-09 9.95e-07 5.2e-09 2.29e-08 1.52e-08 5.7e-09 5.6e-09 9.5e-09 1.46e-08 8.9e-09 1.32e-08 2.22e-08 5.8e-09 6.3e-09 1.74e-08 7.3e-09 1.3e-08 1.45e-08 3.1e-09 1.65e-08 5.09e-08 2.51e-08 0.2723409 0.4704264 0.035685 2.86e-08 5.3e-09 1.3e-09 3e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5792807 
## 
## solution.v:
##  0.02127683 0.1474149 0.2940301 0.02793823 0.0001233277 0.0001993056 0.02649774 0.06727116 0.1802199 0.0008749466 0.02806816 0.2060854 
## 
## solution.w:
##  2.5e-08 3.4824e-06 2.055e-07 1.5369e-06 1.584e-07 4.565e-07 0.204989 3.819e-07 1e-10 0.3738743 1.66e-07 3.464e-07 0.1381101 2.8408e-06 8.226e-07 1.3194e-06 2.44e-08 2.98e-08 1.9432e-06 5.419e-07 4.494e-07 3.7623e-06 4.0671e-06 1e-10 1.0928e-06 4.2422e-06 3.78e-08 7.162e-07 0.2613723 0.0001405804 4.541e-07 5.851e-07 8.51e-08 4.48e-08 1.1077e-06 0.0206402 1.2133e-06 6.322e-07 0.0003969146 0.0004427553 9.917e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10778398 
## 
## solution.v:
##  0.0044965 0.01029335 0.1726856 0.001262908 0.007885023 0.01657748 0.03879738 0.1343052 0.006436765 0.2622945 0.1501953 0.19477 
## 
## solution.w:
##  0.02112931 3.0173e-06 1.89e-08 3.94e-08 3.8e-08 1.45e-08 3.391e-07 1.33e-08 8.96e-08 0.1538712 1.246e-07 2.229e-07 7.96e-08 3.82e-08 1.38e-08 8.04e-08 2.7901e-06 8.66e-08 1.21e-08 6.01e-08 8.098e-07 0.08723651 3.9e-08 1.153e-07 1.54e-08 3.67e-08 1.355e-07 1.43e-08 1.167e-07 4.03e-08 2.15e-08 2.678e-07 1.4e-09 0.737754 8.7e-09 4.17e-08 1.72e-08 2e-08 5.48e-08 1.161e-07 1.77e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41978885 
## 
## solution.v:
##  0.165057 0.004968551 0.0006963206 0.105971 0.165828 0.002102986 0.1159923 0.001133188 0.007039785 0.01831736 0.04695561 0.3659379 
## 
## solution.w:
##  0.10017 2e-10 0.1887349 0.0001021142 6.64336e-05 6.8224e-06 0.0007438854 0.218082 1.46038e-05 2.67566e-05 6.2385e-06 2.03868e-05 1.54319e-05 1.81533e-05 2.48746e-05 2.82973e-05 1.63174e-05 1.54536e-05 2.34884e-05 1.51538e-05 1.3936e-06 1.95727e-05 0.0739277 3.49482e-05 1.10679e-05 1.39755e-05 3.34442e-05 2.59687e-05 2.76179e-05 2.06754e-05 2.27962e-05 5.6496e-06 1.17072e-05 3.55987e-05 2.5e-08 0.0006558646 5.9991e-06 0.4165105 0.0004989321 2.7162e-06 2.6947e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10378982 
## 
## solution.v:
##  0.3373643 8e-08 0.1765167 1.78021e-05 0.00634524 0.0002845281 0.1235957 0.1104696 0.02103553 0.006259905 2.31803e-05 0.2180875 
## 
## solution.w:
##  5.2336e-06 0.001347665 4.1255e-06 1.1839e-06 8.8235e-06 6.252e-07 1.4e-09 3.4405e-06 3.33265e-05 5.3686e-06 1.334e-07 1.12169e-05 5.1206e-06 5.5223e-06 9.925e-07 9.4442e-06 4.67489e-05 6.6224e-06 7.572e-07 1.27272e-05 0.3420022 4.004e-07 2.618e-07 0.3281754 7.547e-07 0.07332068 6.438e-06 1.32221e-05 1.7281e-06 0.2547999 2.7113e-06 2.8813e-06 1.8471e-05 9.342e-06 4.703e-07 2.4417e-06 1.1631e-06 2.5234e-06 2.3753e-06 0.0001254083 2.0869e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 88050439 
## 
## solution.v:
##  0.2388074 0.04243083 0.03160159 0.1001685 0.01084299 0.0007208753 0.06639091 0.00359813 0.1589272 0.0123734 0.2216583 0.1124798 
## 
## solution.w:
##  4.656e-07 8.04e-07 1.073e-06 2.5895e-06 6.733e-07 1.6958e-06 7.21e-07 9.638e-07 5.663e-07 4.5e-07 2.107e-07 9.913e-07 7.32e-07 5.375e-07 0.09876759 8.536e-07 4.932e-07 3.549e-07 6.977e-07 1.3004e-06 1.72e-07 2.859e-07 0.005048778 8.414e-07 8.942e-07 0.422875 1.14e-06 2.978e-07 9.566e-07 0.4732778 6.04e-07 5.745e-07 6.295e-07 3.966e-07 5.455e-07 8.828e-07 2.7614e-06 9.488e-07 1.6638e-06 3.473e-07 6.616e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 39775547 
## 
## solution.v:
##  0.006943551 0.006556178 0.2240182 0.2814143 0.001482672 0.006882384 0.1140608 0.04467007 0.001268821 2.77243e-05 0.0780166 0.2346586 
## 
## solution.w:
##  0.01332913 2.38869e-05 3.24971e-05 2.04352e-05 2.54391e-05 7.9773e-06 6.76248e-05 0.3266808 1.72316e-05 0.187772 1.26651e-05 2.05275e-05 0.01282068 1.7651e-05 2.70925e-05 1.64908e-05 2.15783e-05 0.004645751 0.0005605876 2.78583e-05 6.4442e-06 0.2665388 1.66722e-05 2.32913e-05 0.0001798265 8.0747e-06 9.91196e-05 2.2002e-06 3.753e-07 2.17824e-05 1.79513e-05 1.91251e-05 2.03438e-05 0.1843639 1.963e-07 0.002435208 5.3882e-06 3.004e-07 8.32347e-05 9.7737e-06 1.451e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29537909 
## 
## solution.v:
##  0.00160399 0.2150427 0.01656963 0.08760732 0.002185551 0.1648625 3.70383e-05 0.006793385 2.022e-06 0.001121405 0.2320021 0.2721723 
## 
## solution.w:
##  1.85582e-05 1.50151e-05 4.3396e-06 6.1468e-06 1.02555e-05 5.51877e-05 2.85202e-05 1.3122e-06 0.09897377 0.0005463996 8.89906e-05 2.12191e-05 0.2742252 1.01644e-05 1.1046e-06 4.50409e-05 0.00326077 9.1257e-06 1.9753e-06 6.2557e-06 0.2760275 0.001519471 6.6323e-06 6.3802e-06 2.6373e-06 0.06670673 7.42725e-05 0.0001451293 2.9349e-06 3.01231e-05 0.07607962 4.2361e-06 0.0001613791 1.83976e-05 5.259e-07 8.6724e-06 1.203e-07 3.5524e-06 1.62988e-05 0.201856 6.29e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20569460 
## 
## solution.v:
##  0.005816405 2.113e-06 0.003912727 0.001156091 0.2507528 0.006897469 0.06855458 6.3802e-06 0.02651094 0.06840914 0.1476398 0.4203415 
## 
## solution.w:
##  0.03995863 0.0001725847 0.0002496393 6.567e-07 0.0008504591 0 9.267e-07 0.004964407 1.1879e-06 1.2144e-06 1.6189e-06 8.243e-06 1.8103e-06 6.302e-07 1.364e-07 1.45473e-05 4.1086e-06 1.97926e-05 1.0941e-06 0.4173047 6.808e-07 6.285e-07 1.7187e-06 0.0001731518 0.0001096201 1.18e-07 1.1214e-06 1.00139e-05 1.93091e-05 5.083e-07 4.09e-08 0.2474175 2.411e-07 4.27412e-05 0.2885728 2.059e-06 9.446e-07 1.97642e-05 1.1576e-06 4.7334e-05 2.22295e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12439688 
## 
## solution.v:
##  0.2012333 0.009488534 0.173349 0.136624 0.0006941131 0.05886177 0.1618335 0.0186575 0.00869701 0.007561044 0.1879694 0.0350309 
## 
## solution.w:
##  4.9482e-06 0.0001453175 0.2688298 1.08658e-05 5.4994e-05 6.8588e-06 7.8578e-06 0.0002568402 8.3858e-06 8.253e-07 8.1017e-06 3.28661e-05 2.9533e-06 4.4721e-06 1.7628e-06 6.4592e-06 5.3531e-06 1.17741e-05 2.6387e-06 2.49416e-05 5.6756e-06 1.5054e-06 1.06463e-05 0.0008032352 1.8484e-06 8.1116e-06 3.7631e-06 0.6991082 1.21626e-05 8.0502e-06 4.6995e-06 9.5179e-06 3.3689e-06 6.50376e-05 1.969e-07 6.8864e-06 1.2167e-05 2.4608e-06 4.0264e-06 4.3532e-06 0.03049614 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 416389129 
## 
## solution.v:
##  0.08748357 0.0003875826 0.001861424 0.08580276 0.0003185271 4.2387e-06 0.0001845895 0.07484833 0.0005310151 0.1848003 0.006269044 0.5575086 
## 
## solution.w:
##  1.29e-08 7.7e-09 3.513e-07 7.4e-09 2.41e-08 0.05694883 6.6e-09 7.8e-09 1.06e-08 9.4e-09 8.5e-09 8.6e-09 1.55e-08 6.4e-09 6.3e-09 1.33e-08 7.8e-09 9e-09 1.44e-08 1.28e-08 2.3e-09 7.8e-09 8.5e-09 6.9e-09 8.244e-07 3.25e-08 8.5e-09 1.32e-08 4.14e-08 4.5e-09 5.1e-09 2.11e-08 5.1e-09 1.38e-08 2.96e-08 1.06e-08 4.84e-08 3.055e-07 7.4e-09 5e-09 0.9430492 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7500469 
## 
## solution.v:
##  0.01443596 0.04563231 1.326e-07 0.0001339839 0.2137756 0.004027228 0.04200153 0.09197985 0.1185593 0.2244219 0.03170086 0.2133313 
## 
## solution.w:
##  3.7663e-06 7.9894e-06 6.8374e-06 3.17479e-05 1.9271e-06 3.7221e-06 1.497e-06 3.0454e-06 6.4618e-06 2.7806e-06 0.1523287 4.1531e-06 1.17152e-05 0.04280177 4.1479e-06 2.3703e-06 4.7866e-06 8.2561e-06 5.0485e-06 0.1867082 2.1391e-06 0.3330235 3.3409e-06 0.1205578 3.3922e-06 0.03381111 5.57479e-05 1.3329e-06 2.675e-06 1.87566e-05 0.002526832 0.1268562 0.0001150125 4.6e-09 1.976e-07 0.001060133 3.6873e-06 1.8125e-06 5.5285e-06 1.464e-06 3.397e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28424992 
## 
## solution.v:
##  0.07669403 0.001514285 0.006682537 0.08449276 0.0006939933 0.07411732 0.003677793 0.2243826 0.1422903 0.05370202 0.01135973 0.3203926 
## 
## solution.w:
##  4e-09 2.8e-09 5.1e-09 8.2e-09 2.4e-09 0.055108 2.17e-08 2.4e-09 2.8e-09 2.8e-09 2.43e-08 7.8e-09 6.4e-09 8e-10 0.6514955 4.5e-09 2.3e-09 3.5e-09 0 3.3e-09 4e-10 2.57e-08 1.2623e-06 2.3e-09 8.6e-09 1.9e-09 4.2e-09 2.3e-09 5.3e-09 2.4e-09 2.6e-09 5.8e-09 3.7e-09 9e-10 2.3e-09 0.2932582 2e-09 5.9e-09 4.9e-09 0 0.0001367955 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30055290 
## 
## solution.v:
##  0.1675001 0.003642602 0.06156871 0.1958131 5.6525e-06 0.1367294 0.09281132 0.022422 0.004270286 1.2251e-06 0.01446893 0.3007667 
## 
## solution.w:
##  1.16e-07 1.151e-07 0.6620667 2.59e-07 2.647e-07 5.12983e-05 1.424e-07 2.163e-07 1.663e-07 2.998e-07 5.86e-08 1.254e-07 2.118e-07 1.433e-07 1.806e-07 2.935e-07 1.755e-07 8.24e-08 3.51e-07 2.241e-07 6.1e-09 1.455e-07 2.297e-07 8.51e-08 0.03826566 3.85e-07 2.054e-07 1.795e-07 0.0406225 1.249e-07 2.371e-07 1.531e-07 9.96e-08 1.831e-07 1.937e-07 0.1595471 3.195e-07 3.549e-07 2.434e-07 5.22e-08 0.09944012 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 831787.2 
## 
## solution.v:
##  0.08067146 0.1898914 0.06640922 2.20016e-05 0.1186979 0.01452522 0.1004558 0.0535684 0.0004970764 0.001473602 0.0007657061 0.3730223 
## 
## solution.w:
##  0.08142113 0.0001616929 3.1067e-06 1.1603e-05 2.0876e-06 2.427e-06 0.2894303 4.7233e-06 3.1415e-06 0.00232055 1.6532e-06 2.7312e-06 6.71211e-05 1.8846e-06 6.725e-07 0.0005315689 1.68571e-05 1.9058e-06 0.1635661 8.2783e-06 3e-10 1.81827e-05 0.1108183 3.788e-07 0.0001188918 2.9617e-06 0.001270437 6.4671e-06 0.0005174114 3.8754e-06 6.528e-06 4.3388e-06 1.10571e-05 1.9618e-06 2.3974e-06 2.4656e-06 1.38889e-05 3.5418e-06 8.18671e-05 0.3475229 0.002032553 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21338547 
## 
## solution.v:
##  0.0004830526 0.03700435 0.05233331 1.8e-09 0.1184109 0.168828 0.1934324 0.007281254 0.02990056 0.1478757 0.1434922 0.1009582 
## 
## solution.w:
##  0.1572069 0.001371096 3.508e-07 4.278e-07 7.217e-07 3.878e-07 6.486e-07 5.185e-07 5.882e-07 1.1953e-06 6.908e-07 1.66726e-05 2.2579e-06 4.451e-07 3.457e-07 5.3689e-06 1.708e-06 9.695e-07 5.613e-07 8.063e-07 0.02088653 5.179e-07 4.5e-09 8.123e-07 7.775e-07 2.357e-07 3.1285e-06 1.0643e-06 5.577e-07 7.44e-08 1.027e-07 6.694e-07 4.646e-07 8.884e-07 6.042e-07 1.424e-07 2.659e-07 7.386e-07 5.908e-07 0.7770734 0.04341584 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 56374618 
## 
## solution.v:
##  0.0017247 0.002520486 0.01493584 0.03883296 0.001240954 0.01968019 2.39315e-05 0.2355905 0.002935339 0.00165337 0.0001169055 0.6807448 
## 
## solution.w:
##  6.65e-08 7.45e-08 1.36e-07 1.356e-07 4.65e-08 0.8723038 5.84e-08 8.83e-08 4.41e-08 1.261e-07 4.52e-08 5.94e-08 5.7e-08 7.34e-08 3.5e-09 1.028e-07 6.41e-08 3.83e-08 8.525e-07 1.044e-07 3.02e-08 6.47e-08 1.183e-07 4.09e-08 1.307e-07 6.25e-08 1.114e-07 3.49e-08 6.418e-07 5.9e-08 7.49e-08 6.24e-08 4.49e-08 3e-10 3.44e-08 0.1276919 8.59e-08 3.7e-09 3.984e-07 1.148e-07 5.6e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_loonv <- mspe.test(placebos_loonv, discard.extreme = FALSE)

mspe_test_loonv$p.val
## [1] 0.06976744

LOO 5: SC

Prepare Data (LOO SC)

ds_state_slim_loosc <- ds_state_slim %>% filter(state != "SC")


ds_state_slim_loosc <- ds_state_slim_loosc %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "HI" ~ 7,
             state == "IA" ~ 8,
             state == "ID" ~ 9,
             state == "IL" ~ 10,
             state == "IN" ~ 11,
             state == "KS" ~ 12,
             state == "KY" ~ 13,
             state == "LA" ~ 14,
             state == "MD" ~ 15,
             state == "ME" ~ 16,
             state == "MI" ~ 17,
             state == "MO" ~ 18,
             state == "MS" ~ 19,
             state == "MT" ~ 20,
             state == "NC" ~ 21,
             state == "ND" ~ 22,
             state == "NE" ~ 23,
             state == "NH" ~ 24,
             state == "NJ" ~ 25,
             state == "NM" ~ 26,
             state == "NV" ~ 27,
             state == "NY" ~ 28,
             state == "OH" ~ 29,
             state == "OK" ~ 30,
             state == "OR" ~ 31,
             state == "PA" ~ 32,
             state == "RI" ~ 33,
             state == "SD" ~ 34,
             state == "TN" ~ 35,
             state == "TX" ~ 36,
             state == "UT" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))


data_prep_out_loosc <- dataprep(
  foo = ds_state_slim_loosc,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013, c("median")),
    list("median_contributions", 2014, c("median")),
    list("median_contributions", 2015, c("median")),
    list("median_contributions", 2016, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_loosc$state_id[ds_state_slim_loosc$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO SC)

synth_out_loosc <- synth(
  data.prep.obj = data_prep_out_loosc)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 27771065 
## 
## solution.v:
##  0.006015786 2.2897e-06 0.009347334 3.58096e-05 0.01719788 0.05419219 0.3072883 0.001060715 0.004395965 0.1681533 0.01002196 0.1817051 0.07823241 0.1500188 0.0123322 
## 
## solution.w:
##  2.738e-07 3.241e-07 0.0004177055 4.615e-07 2.55036e-05 0.5065562 2.242e-07 0.04320678 0.0004180006 1.7121e-06 3.638e-07 2.122e-07 5.153e-07 2.3624e-06 3.908e-07 1.1262e-06 2.0737e-06 6.17e-08 7.481e-07 9.297e-07 7.195e-07 2.551e-07 2.551e-07 2.138e-07 2.677e-07 0.1519836 1.04103e-05 6.449e-07 1.983e-06 1.7824e-06 4.394e-07 3.503e-07 8.738e-07 0.1996213 1.12232e-05 0.09771863 8.662e-07 3.822e-07 8.1622e-06 3.555e-07 3.864e-07 9.486e-07
synth_AZ_median_contributions_loosc <- as.numeric(data_prep_out_loosc$Y0 %*% synth_out_loosc$solution.w)

Hypothesis Testing (LOO SC)

placebos_loosc <- generate.placebos(
  dataprep.out = data_prep_out_loosc,
  synth.out = synth_out_loosc,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2086289 
## 
## solution.v:
##  0.0452996 0.4214754 0.01637496 2.34538e-05 0.04543484 0.01184403 0.02808962 2.6204e-06 5.2907e-06 0.01400249 0.0004717048 0.2271752 0.1712024 0.01516398 0.003434424 
## 
## solution.w:
##  1.7888e-06 2.2001e-06 1.1329e-06 0.0001299059 3.755e-07 4e-10 1.4509e-06 2.2852e-06 2.9791e-06 4.4911e-06 3.9393e-06 7.609e-07 5.2563e-06 1.3356e-06 0.3021953 3.5591e-06 0.1062926 1.7594e-05 2.034e-06 1.3241e-06 2.57732e-05 1.3952e-06 0.2078635 4.30266e-05 0.0008319627 1.6707e-06 1.2066e-06 0.009850747 6.5364e-06 1.1898e-06 5.695e-07 2.1143e-06 3.95588e-05 1.53606e-05 8.583e-07 2.0192e-06 2.294e-06 3.0234e-06 3.0768e-06 0.3726327 1.0856e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4408302 
## 
## solution.v:
##  0.0004265542 0.01867255 0.1129952 2.971e-07 1.06244e-05 0.006837029 0.007232668 0.0008100907 1.21726e-05 0.0001525973 0.0321241 0.2521844 0.0654826 0.07629404 0.4267651 
## 
## solution.w:
##  0.0005692672 5.13111e-05 3.30096e-05 8.99595e-05 3.33168e-05 4.68505e-05 2.4903e-05 0.06756386 7.80499e-05 0.6021593 0.0008324646 3.0095e-05 7.19553e-05 1.77988e-05 7.51944e-05 9.79332e-05 5.70183e-05 2.66259e-05 0.0001154586 0.07897467 2.16099e-05 4.01072e-05 0.2030513 3.49919e-05 0.0003982704 0.001605667 3.77857e-05 0.01369485 2.78411e-05 0.0001742032 6.09262e-05 5.51703e-05 0.0003135646 0.01583827 2.20988e-05 5.01906e-05 3.74015e-05 6.00252e-05 3.71664e-05 0.0007838048 0.01270575 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4071758 
## 
## solution.v:
##  0.1035799 0.03813566 0.07634397 0.008428178 0.06933633 0.04355891 0.05137114 0.06834312 0.10614 0.03472067 0.04587776 0.1139198 0.05182752 0.1008572 0.08755988 
## 
## solution.w:
##  8.705e-07 8.928e-07 1.0703e-06 2.4788e-06 0.05939613 9.573e-07 0.1289817 5.236e-07 4.219e-07 5.765e-07 6.47e-07 1.3857e-06 2.889e-07 2.872e-07 5.554e-07 4.356e-07 1.0185e-06 2.84e-07 9.948e-07 1.001e-07 4.801e-07 7.829e-07 0.02137209 3.5306e-05 3.246e-07 0.2270584 6.515e-07 3.877e-07 8.6766e-06 3.74e-07 3.485e-07 2.176e-07 8e-09 0.3615693 0.2015373 1.4566e-06 6.412e-07 2.09586e-05 3.837e-07 9.88e-08 2.031e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5036051 
## 
## solution.v:
##  0.04835876 0.0001630429 0.06644125 0.201153 3.6508e-06 0.02902491 0.04929846 0.08368739 0.007732951 0.006306747 0.1461044 0.1366605 0.07573015 0.1443424 0.004992375 
## 
## solution.w:
##  1.22412e-05 3.38579e-05 3.71229e-05 1.17751e-05 3.04728e-05 0.08310626 2.05696e-05 2.395e-05 2.21465e-05 0.0001306931 1.53707e-05 9.6864e-06 7.3553e-06 0.04954494 1.15695e-05 1.67253e-05 1.18374e-05 8.2826e-06 1.49453e-05 0.02757983 0.09691501 0.5439635 3.28137e-05 8.4107e-06 7.4158e-06 0.001528264 1.27992e-05 1.65418e-05 4.66607e-05 1.94616e-05 3.7e-09 9.6069e-06 5.124e-06 1.34503e-05 0.1901641 6.461e-07 0.001188745 5.19136e-05 1.0996e-05 5.7587e-06 0.005349102 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1060898 
## 
## solution.v:
##  0.02382057 0.1176154 0.1500594 0.08484017 0.0001263011 0.0005025223 0.01953535 5.7332e-06 0.02583042 0.0006388404 0.1912485 0.1248948 0.1026918 0.07620965 0.08198054 
## 
## solution.w:
##  0.0001255663 0.0001449636 0.2077838 0.0004342841 8.49577e-05 0.0001718703 0.0616502 0.0001253932 0.000176496 0.0001228379 0.0001981837 0.00023581 0.0001589672 0.0001488627 0.1078824 0.108741 0.0002010054 6.93606e-05 0.0002122958 0.167667 0.0001085379 0.0003830926 0.04600715 0.0001478905 0.0002341445 0.0005393262 0.0001804188 0.0001585146 0.06112859 0.0001843302 0.0001608542 0.0001186545 0.01286791 0.0001725706 0.007448117 0.0001641912 0.0002718772 0.2129309 0.0001823978 0.000275131 1.42e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20966932 
## 
## solution.v:
##  0.001105797 0.002228982 0.008733972 0.03759785 1.563e-07 0.0008720624 0.00216803 0.0009395087 6.76e-08 0.08076007 2.02603e-05 0.3364846 0.09836573 0.4269981 0.00372481 
## 
## solution.w:
##  1.38872e-05 1.33876e-05 6.37368e-05 5.48506e-05 3.67622e-05 1.37205e-05 7.77376e-05 5.02909e-05 5.75043e-05 1.41502e-05 2.00534e-05 0.0001098699 3.34772e-05 0.000848331 4.52873e-05 4.2013e-05 1.39796e-05 2.32172e-05 4.6085e-05 2.86275e-05 1.94074e-05 2.43307e-05 8.3838e-06 2.12308e-05 7.9841e-06 0.04475028 4.02186e-05 4.67533e-05 5.01818e-05 2.88971e-05 1.4521e-06 0.0007938744 3.3676e-05 5.02007e-05 0.1010062 2.2175e-05 0.1457285 0.0008514373 2.02361e-05 1.4876e-05 0.7048727 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45056680 
## 
## solution.v:
##  0.0002432423 2.53344e-05 0.1202273 0.001902075 0.007525146 2.13009e-05 7.02675e-05 0.00122444 0.1349866 4.98331e-05 0.2156653 0.08136889 0.290515 0.08965053 0.05652476 
## 
## solution.w:
##  8.3e-09 2.57e-08 6.5e-09 2.75e-08 1.2e-08 5e-10 1.35e-08 1e-08 1.3e-08 3.31e-08 4.83e-08 2.14e-08 5.47e-08 2.14e-08 2.74e-08 1.68e-08 1.51e-08 1.05e-08 1.39e-08 2.61e-08 0 1.056e-07 0.999999 1.55e-08 4.3e-09 4e-09 2.93e-08 7.2e-09 1.23e-08 4.9e-08 5.33e-08 3.21e-08 1.08e-08 7.6e-09 1.7e-09 1.93e-08 1.04e-08 5.8e-09 1.054e-07 1.034e-07 2.8e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 42850398 
## 
## solution.v:
##  0.1372316 0.01266995 0.003051087 0.04650341 0.07812419 0.08767902 0.05469686 0.003999571 0.1253266 0.01058722 0.02802573 0.1004003 0.04907636 0.2257616 0.03686652 
## 
## solution.w:
##  7.7e-09 1.39e-08 0 2.24e-08 0.0001136663 2.08e-08 1.9e-09 2.055e-07 5.9e-09 5.1e-09 1.89e-08 2.08e-08 5.44e-08 1.84e-07 1.33e-08 1.91e-08 5.51e-08 1.98e-08 0.06670535 8.75e-08 5e-10 1.52e-08 1.615e-07 8.2e-09 5.28e-08 8.7e-09 1.12e-08 1.2e-08 0.3740898 1.937e-07 1.215e-07 1.22e-08 0.370842 2.07e-08 6.79e-08 5.6e-09 2.21e-08 1.57e-08 8.1e-09 2.85e-08 0.1882477 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 21984096 
## 
## solution.v:
##  0.00948033 0.1278721 0.004195362 0.001200564 0.1106979 0.04928901 0.009929984 0.09548773 7.2062e-06 0.003002394 0.06304028 0.04612244 0.08912361 0.2272917 0.1632595 
## 
## solution.w:
##  1.9303e-06 5.8754e-06 3.378e-05 3.2747e-06 9.936e-07 0.2469749 2.8465e-06 3.3909e-06 1.41417e-05 0.06046642 2.1805e-06 1.5209e-05 0.1751749 1.02e-08 2.894e-06 5.6597e-06 0.0001876247 6.616e-06 2.41683e-05 4.1754e-06 8.3668e-06 1.3004e-06 8.125e-07 3.2312e-06 2.8124e-06 0.008461496 3.04054e-05 1.15329e-05 2.3105e-06 0.1922583 2.9583e-06 0.0005839781 1.1871e-06 0.3085526 2.4e-09 0.007134699 1.4708e-06 4.3876e-06 2.7625e-06 2.2697e-06 2.1496e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 612696.5 
## 
## solution.v:
##  3.4661e-06 0.006288715 0.006642385 0.001681142 0.01453418 0.02807151 0.0003154732 0.01657157 0.06514833 0.00881496 0.0004754741 0.3256599 0.4179371 0.1015873 0.006268489 
## 
## solution.w:
##  5.27978e-05 0.02388344 2.1356e-06 1.0364e-06 2.354e-06 1.2894e-06 1.3997e-06 1.9035e-06 4.2829e-06 4.6644e-06 2.4297e-06 1.7669e-06 1.45948e-05 1.2764e-06 5.7015e-06 0.6559708 3.1046e-06 1.54702e-05 5.5039e-06 4.348e-07 2.5346e-06 1.2452e-06 7.169e-07 4.9704e-06 0.001122237 0.03950823 1.9181e-06 9.3984e-06 3.8485e-06 1.7997e-06 2.9085e-06 6.459e-07 0.05687826 1.1124e-06 3.2746e-06 0.0898003 9.72e-07 3.2265e-06 1.48378e-05 0.000545156 0.132116 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 35382178 
## 
## solution.v:
##  1.13532e-05 0.1468308 0.08186486 0.0005477229 4.3638e-05 0.04062743 0.0002801195 2.74195e-05 0.005885362 0.04115623 0.02740148 0.3003009 0.2285179 0.08393976 0.04256506 
## 
## solution.w:
##  4.8426e-06 0.8143023 5.221e-07 3.2329e-06 1.6339e-06 7.236e-07 0.03820367 9.637e-07 1.6732e-06 6.3677e-06 6.8853e-06 3.1977e-06 3.7242e-06 2.3445e-06 3.6588e-06 4.9055e-06 3.7e-08 3.0289e-06 9.72e-07 1.55706e-05 0.002721945 2.0405e-06 8e-09 1.8808e-06 5.33e-08 8.603e-07 4.4633e-06 2.3899e-06 1.5386e-06 4.2479e-06 0.1439405 0.0001897151 1.8767e-06 1.07e-06 5.047e-07 1.4639e-06 1.6005e-06 1.2424e-06 1.0002e-05 0.000540845 1.4659e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4883880 
## 
## solution.v:
##  0.09886548 0.05408714 0.06828344 0.1359388 0.1646397 0.08115947 1.17577e-05 0.03970471 0.003527427 0.0008015241 0.009900594 0.1121037 0.0683575 0.07077361 0.09184518 
## 
## solution.w:
##  0.1082179 0.1317273 3.0081e-06 6.6469e-06 5.6715e-06 2.4198e-06 0.3517612 7.8277e-06 4.0979e-06 3.4948e-06 6.3256e-06 0.07949533 2.6424e-06 8.7615e-06 6.8461e-06 5.8651e-06 1.0727e-06 2.4433e-06 7.6847e-06 0.1436445 4.6257e-06 0.001029787 8.881e-07 9.1462e-06 2.1232e-06 1.3185e-06 5.5134e-06 6.2758e-06 3.2672e-06 0.1134071 3.21722e-05 1.37466e-05 7.522e-06 6.418e-06 2.511e-07 2.3868e-06 4.5103e-06 2.6839e-06 6.1177e-06 0.01635062 0.05418241 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41624165 
## 
## solution.v:
##  0.1082112 0.08077322 0.04966663 0.1303918 0.1887896 0.007184287 0.05467382 8.78466e-05 0.000159546 0.005223239 0.001923041 0.08600906 0.06789238 0.09212255 0.1268918 
## 
## solution.w:
##  1.4718e-06 8.094e-07 0.03956893 3.421e-07 1.8622e-06 7.256e-07 5.273e-07 1.24e-08 8.011e-07 0.02678062 5.686e-07 6.765e-07 9.729e-07 4.306e-07 6.191e-07 0.07646839 3.7956e-06 6.539e-07 0.05159917 4.823e-07 1.5926e-06 2.792e-07 4.896e-07 1.2619e-06 1.1e-09 8.307e-07 0.5912308 9.352e-06 9.54e-07 4.612e-07 4.19e-08 1.488e-07 3.2404e-06 9.616e-07 0.2143135 2.2565e-06 2.689e-07 5.8e-07 7.084e-07 3.735e-07 2.93e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 23190811 
## 
## solution.v:
##  0.03601779 4.13499e-05 0.132147 0.0002679135 0.01868812 0.2645172 0.06043988 0.05542874 0.008881763 0.002790845 0.009067808 0.08223987 0.1113544 0.1250688 0.09304854 
## 
## solution.w:
##  5.132e-07 6.7e-09 9.73e-07 3.2267e-06 1.2527e-06 6.957e-07 1.2897e-06 0.1065631 3.1261e-06 1.6961e-06 1.1817e-06 7.779e-07 1.4252e-06 1.1831e-06 9.8377e-06 1.5355e-06 7.035e-07 1.6054e-06 1.0949e-06 0.01481486 9.601e-07 0.04509486 3.2e-09 8.602e-07 6.834e-07 0.01834258 3.1912e-06 6.04e-07 1.49584e-05 0.07025798 0.06678939 4.015e-06 6.089e-07 6.062e-07 3.4e-09 0.6478972 9.464e-07 1.5956e-06 3.194e-07 0.03017832 2.14e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1384225 
## 
## solution.v:
##  0.1275796 0.03196176 0.009898866 0.03599752 0.004124371 0.004652374 0.01890994 0.2221429 6.98533e-05 6.48818e-05 0.002345187 0.1457226 0.0208016 0.204919 0.1708095 
## 
## solution.w:
##  2.2012e-06 3.1291e-06 2.0215e-06 0.04584773 2.2212e-06 4.4e-09 9.1061e-06 5.0235e-06 3.8113e-06 2.0032e-06 0.04525327 5.119e-06 3.3485e-06 7.0196e-06 2.8559e-06 2.7097e-06 1.01188e-05 0.05800926 3.0046e-06 0.0004931116 5.4753e-06 0.1593559 0.1682921 2.81e-06 2.2103e-06 1.9558e-06 4.158e-06 1.5485e-06 3.1955e-06 2.18421e-05 0.003388472 5.7648e-06 1.118e-06 1.3604e-06 9.295e-07 3.5336e-06 0.5192317 1.6255e-06 5.6181e-06 1.503e-07 1.4986e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10040833 
## 
## solution.v:
##  0.044633 0.0004330445 0.08888788 0.0207257 0.02079948 0.02259752 0.005007754 0.02471684 0.04484424 0.008241926 0.02545563 0.1032116 0.1607614 0.1885813 0.2411027 
## 
## solution.w:
##  6.3722e-06 1.237e-06 3.7102e-06 5.383e-07 0.01166159 8.242e-07 5.3303e-06 9.25e-08 3.0292e-06 8.475e-07 8.936e-07 2.32071e-05 0.1125361 0.1090225 4.196e-07 0.2869508 8.119e-07 3.333e-07 6.516e-07 9.60487e-05 1.4528e-06 0.177927 6.5012e-06 9.033e-07 3.475e-07 0.000547811 0.1941188 7.6851e-06 2.245e-07 6.47e-08 1.323e-07 1.2999e-06 3.1474e-06 5.8944e-06 1.98e-07 1.0797e-06 1.2534e-06 0.1070411 5.69e-08 1.93329e-05 3.424e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9069193 
## 
## solution.v:
##  0.0001105977 0.04830799 0.002222471 0.0009218154 0.0123691 0.07699589 0.09999862 0.2719694 0.01363695 0.02074592 0.0975466 0.07592995 0.04164443 0.03994592 0.1976544 
## 
## solution.w:
##  8.9511e-06 1.48809e-05 8.284e-06 0.01478476 3.09927e-05 1.3815e-06 0.09106321 2.8759e-06 7.45e-06 0.4009877 4.9043e-06 6.8754e-06 0.1400424 5.1605e-06 1.9292e-06 0.1092907 1.42856e-05 1.4329e-06 4.3048e-06 4.68922e-05 2.13026e-05 9.0806e-06 0.000268349 2.2378e-06 2.9134e-06 2.32075e-05 7.9131e-06 2.98645e-05 3.8099e-06 9.34894e-05 0.01164163 4.5697e-06 0.2315171 5.5e-09 2.125e-07 4.9725e-06 1.4224e-06 3.4444e-06 1.1149e-05 2.282e-05 1.1463e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 13721072 
## 
## solution.v:
##  0.1671506 0.000298237 0.02590521 0.08129415 2.6166e-06 0.1202763 0.009601157 0.01847804 0.1737546 0.02752311 0.007366232 0.1214399 0.02240327 0.1524558 0.0720507 
## 
## solution.w:
##  0.2545918 0.1432762 1.0447e-06 4.513e-07 4.7019e-06 1.893e-07 4.602e-07 5.398e-07 4.0112e-06 2.7307e-06 0.1305834 5.753e-07 1.0834e-06 1.8316e-06 2.958e-07 1.3419e-06 5.8281e-06 3.292e-07 1.151e-06 4.4e-09 1.014e-06 3.449e-07 0.002958579 4.901e-07 0.09889552 2.474e-07 1.2773e-06 3.27006e-05 5.469e-07 1.264e-06 4.484e-07 1.244e-06 0.0003414713 1.1637e-05 3.116e-07 1.4189e-06 1.989e-07 5.647e-07 7.243e-07 0.3692718 1.883e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10240439 
## 
## solution.v:
##  0.06282332 0.272222 9.91226e-05 0.07197394 0.002876364 0.0001012074 0.004220738 0.01736238 0.2062358 0.001050683 0.00130925 0.01134006 0.1385963 0.00522773 0.2045611 
## 
## solution.w:
##  7.3e-08 1.842e-07 1.993e-07 2.616e-07 2.898e-07 4.31e-08 2.691e-07 1.027e-07 3.715e-07 4.0204e-06 2.011e-07 1.917e-07 2.705e-07 1.7833e-06 3.108e-07 9.9574e-06 3.344e-07 1.257e-07 1.803e-07 0.2163558 0.1001222 3.977e-07 5.91e-08 1.2357e-06 0.2103035 0.0215194 5.702e-07 3.147e-07 1.2167e-06 1.991e-07 8.98e-08 5.15e-07 1.372e-07 2.12e-07 4.253e-07 4.456e-07 7.154e-07 4.638e-06 0.1563814 1.24e-08 0.2952873 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 671604.3 
## 
## solution.v:
##  0.009084158 0.02578157 0.000149346 0.01234876 0.01677403 0.004516649 0.007324176 0.006673681 0.0007722588 0.4105136 0.03364337 0.279257 0.05152186 0.08403976 0.05759975 
## 
## solution.w:
##  2.14091e-05 0.1566329 0.1821062 1.17245e-05 1.8245e-05 1.11651e-05 9.3435e-06 0.2907486 0.01132915 0.08273679 1.14509e-05 1.90979e-05 0.001932885 3.85228e-05 1.07803e-05 2.89542e-05 0.0001264784 0.0002479085 2.09173e-05 1.31272e-05 1.05981e-05 1.10619e-05 1.22124e-05 1.30559e-05 0.04308398 9.4811e-06 0.0002879026 5.9989e-05 1.57053e-05 0.0001553076 0.1222384 4.25847e-05 0.08883463 4.98111e-05 0.001058436 3.14186e-05 1.04463e-05 2.89915e-05 1.88727e-05 4.41342e-05 0.01790737 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 66442814 
## 
## solution.v:
##  5.61642e-05 0.0003059921 0.06805686 0.001705718 0.1183652 0.0005646498 0.0003303972 0.1537666 0.3049241 0.1288674 0.0001402989 0.1913682 0.001471372 0.0004222863 0.02965477 
## 
## solution.w:
##  1.0856e-06 3.75e-08 4.46e-08 1e-09 4.68e-08 5.72e-08 0.1919027 1.57e-07 3.88e-08 1.7061e-06 6.39e-08 1.9793e-06 2.914e-07 5.69e-08 7.57e-08 2.719e-07 4.759e-07 8.44e-08 2.919e-07 3.708e-07 8.585e-07 0.2231984 2.91e-08 7.5e-08 4.05e-08 1.27e-08 1.4367e-06 2.265e-07 1.21e-07 0.5663321 0.0001502381 6.4288e-06 1.204e-07 7.42e-08 6.1e-08 1.893e-07 8.68e-08 1.117e-07 0.001616115 0.01678142 2.0373e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41823555 
## 
## solution.v:
##  0.04236566 0.07574076 0.1037727 0.06538394 0.08462683 0.07380621 0.02358798 0.06019812 0.04623514 0.05067022 0.1011726 0.07590968 0.1276919 0.04798362 0.02085455 
## 
## solution.w:
##  4.71e-08 2.03e-08 1.69e-08 4.15e-08 3.37e-08 2.083e-07 0.5141283 2.3e-09 5.02e-08 0.06563077 0.2396815 5.75e-08 1.741e-07 2.11e-08 8.99e-08 6.82e-08 8.38e-08 6.13e-08 0.03673484 2.41e-08 0.05157272 1.88e-08 4.3e-09 6.622e-07 1.9e-09 1.07e-08 9.25e-08 0.09223676 2.03e-08 1.68e-08 1.35e-08 1.20091e-05 4.66e-08 8.81e-08 1.11e-08 3.11e-08 7.07e-08 2.39e-08 7.99e-08 6.36e-08 8.468e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 11421300 
## 
## solution.v:
##  0.04078277 0.04531542 5.676e-07 0.1625002 0.01221001 0.05712274 0.001529171 0.001383158 0.0320537 0.110427 0.01537408 0.1910717 0.1401409 0.1403125 0.04977615 
## 
## solution.w:
##  6.033e-07 5.074e-07 6.431e-07 2.52343e-05 6.815e-07 6.058e-07 0.4136896 3.013e-07 4.518e-07 1.0398e-06 1.67e-07 8.882e-07 1.1077e-06 7.146e-07 3.245e-07 1.5e-09 7.932e-07 1.96e-07 5.765e-07 4.317e-07 9.524e-07 8.837e-07 1.151e-07 1.3622e-06 1.317e-07 0.01526414 2.8045e-06 5.261e-07 1.2972e-06 0.4208618 0.0007392983 7.682e-07 3.607e-07 3.957e-07 1.865e-07 5.703e-07 0.1233941 1.1534e-06 0.02600274 1.3632e-06 2.11e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 22208536 
## 
## solution.v:
##  0.001027228 0.007823868 0.1716583 0.0003557483 0.1546413 0.009020842 0.01829996 0.004321332 0.06819332 0.01012923 0.05688065 0.1872926 0.003637491 0.1379188 0.1687993 
## 
## solution.w:
##  4.7322e-06 5.6234e-06 1.42872e-05 1.65165e-05 2.84582e-05 1.883e-06 0.8481303 7.5102e-06 4.4595e-06 8.08e-07 0.08968305 1.87636e-05 1.527e-06 4.338e-06 0.0279301 1.7536e-06 1.6745e-06 0.002183977 1.1623e-06 4.1989e-06 1.0159e-06 2.022e-07 6.87887e-05 2.7553e-06 2.226e-07 1.47686e-05 1.6019e-06 3.3654e-06 3.0349e-06 2.53146e-05 6.1044e-06 1.1917e-06 4.5672e-06 1.82011e-05 1.653e-07 0.03178902 1.12495e-05 1.1513e-06 1.3299e-06 7.17e-07 1.318e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45896752 
## 
## solution.v:
##  0.01025538 0.0008650239 0.008587721 0.006300883 0.001772371 0.004071947 0.03218029 0.09058566 0.009189132 0.1613962 0.1289898 0.1053411 0.3558383 0.004053582 0.08057255 
## 
## solution.w:
##  0.002275733 2.45243e-05 2.65481e-05 4.8298e-06 1.07326e-05 8.7432e-06 0.08013444 1.5072e-06 6.0481e-06 5.1984e-06 3.869e-07 3.10787e-05 3.72221e-05 4.43023e-05 4.4962e-06 5.20449e-05 5.7864e-06 6.95138e-05 3.78164e-05 7.8566e-06 1.9829e-06 1.40287e-05 0.0003230166 0.161425 0.5216669 1.52763e-05 2.5227e-05 2.6815e-06 1.84018e-05 6.3594e-06 4.9693e-06 5.0681e-06 4.0932e-06 3.5581e-06 0 3.09034e-05 0.180224 8.5708e-06 0.0003645892 0.05306621 3.918e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 168275199 
## 
## solution.v:
##  0.002402259 0.005324561 0.06912215 0.01453252 0.0006022384 0.008111208 0.07382112 0.004871792 0.1374971 0.1132597 0.02604458 0.1923162 0.2809723 0.01937399 0.05174827 
## 
## solution.w:
##  2.9592e-06 2.952e-07 5.93e-08 1.87e-08 4.56e-08 6.7e-08 9.6e-09 4.093e-07 5.4e-09 5.37e-08 2.15e-08 8.32e-08 3.18e-08 0 2.45e-08 5.7e-09 3.82e-08 1.1302e-06 1.4133e-06 4.011e-07 2.52e-08 3e-08 1.7e-08 2.03e-08 0.2897908 1e-10 1.54e-08 1.0818e-06 6.74e-08 1.35e-08 1.05e-08 2.44e-08 8.0099e-06 3.7256e-06 0.63212 2.94e-08 8.11e-08 1.37e-07 8.6e-09 3.86e-08 0.07806882 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2738895 
## 
## solution.v:
##  0.2229007 0.02306716 0.08655334 0.07251625 0.02502013 0.2329796 0.05765867 0.04401516 1.20532e-05 0.01531699 0.02951267 6.429e-06 0.0655267 0.01330938 0.1116047 
## 
## solution.w:
##  1.423e-07 2.327e-07 2.2928e-06 3.054e-07 7.288e-07 0.2214693 3.21e-08 1.447e-07 9.269e-07 3.427e-07 1.111e-07 1.614e-07 1.39e-07 6.261e-06 1.459e-07 4.823e-07 3.865e-07 1.418e-07 1.281e-07 3.797e-07 2.033e-07 3.02e-08 2.093e-07 4.425e-07 7.65e-08 1.812e-07 1.911e-07 2.613e-07 2.262e-07 3.872e-07 5.703e-07 2.855e-07 7.011e-07 3.375e-07 0.2720801 0.4700252 0.03640644 1.0161e-06 1.466e-07 1.218e-07 4.79e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 6593207 
## 
## solution.v:
##  0.04164659 0.08204878 0.1420699 0.07781814 8.46426e-05 0.06460177 0.1159532 0.09928804 0.06951967 0.0001570399 0.07471272 0.08608886 0.03040805 0.022942 0.0926606 
## 
## solution.w:
##  6.0482e-06 1.092e-07 3.26e-06 1.22672e-05 4.9502e-06 5.336e-06 0.1601729 4.6612e-06 1.00239e-05 0.2790365 1.42045e-05 1.34361e-05 0.2150912 3.47178e-05 1.10494e-05 1.01136e-05 2.5664e-05 2.48944e-05 1.44489e-05 8.0042e-06 2.15648e-05 0.04842268 1.16202e-05 7.617e-06 1.13506e-05 6.1419e-06 5.161e-07 9.0948e-06 6.5117e-06 0.2116805 -2e-10 0.000326704 4.5582e-06 5.2297e-06 4.7374e-06 5.96e-07 7.6374e-06 5.0834e-06 0.08486273 9.46586e-05 6.7429e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10485492 
## 
## solution.v:
##  0.02388611 0.009255121 0.1543652 0.07886166 0.006690239 0.03171068 0.2223409 0.007237398 0.0001627549 0.004303379 0.09163157 0.0623755 0.1539722 0.05888454 0.09432279 
## 
## solution.w:
##  5.64961e-05 4.5563e-06 1.389e-07 2.354e-07 3.313e-07 6.32e-08 9.356e-07 1.772e-07 2.131e-07 0.2571353 7e-10 1.1194e-06 3.036e-07 1.656e-07 7.6e-08 4.433e-07 2.49898e-05 1.0042e-05 9.76e-08 3.973e-07 0.03866279 0.0509727 2.367e-07 1.2131e-06 1.581e-07 3e-09 9.83e-08 5.79e-07 1.601e-07 3.362e-07 1.412e-07 2.741e-07 7.313e-07 0.6531219 2.42e-08 2.206e-07 1.14e-07 1.275e-07 3.137e-07 1.582e-06 1.617e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 43456233 
## 
## solution.v:
##  0.07443521 0.0001068376 0.02517185 0.1129246 0.1767921 0.05960359 0.08377308 0.000880491 0.08598464 0.008821626 0.006936154 0.1463127 0.02397877 0.04207616 0.1522022 
## 
## solution.w:
##  1.3099e-06 3.602e-07 0.1662927 6.60208e-05 5.4812e-06 5.1239e-06 2.49642e-05 0.2915165 1.4035e-06 1.4521e-06 1.2303e-06 1.5665e-06 1.6592e-06 4.2298e-06 0.001284337 1.8935e-06 9.744e-07 1.732e-06 0.0001676674 9.46e-07 1.571e-07 8.5938e-06 0.07884657 1.6692e-06 0.0001824964 7.11e-07 2.6556e-06 1.3927e-06 1.3935e-06 8.566e-07 1.4285e-06 8.149e-07 9.083e-07 1.7901e-06 3.38e-08 0.02120634 7.9622e-06 0.3549372 0.0854149 1.497e-07 3.414e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4402851 
## 
## solution.v:
##  0.112101 0.007091209 0.04592829 0.03107719 0.1073878 0.01205207 0.07758234 0.06978263 0.0004409946 1.96e-06 1.37898e-05 0.02127038 0.207787 0.1161793 0.1913041 
## 
## solution.w:
##  2.42418e-05 0.1806559 3.15707e-05 0.0003577468 2.00042e-05 3.25792e-05 0.0001004212 4.79429e-05 0.1252241 2.81935e-05 0.001357603 6.35251e-05 9.086e-05 3.27179e-05 8.3368e-05 2.39942e-05 3.54143e-05 0.0002830893 4.29834e-05 5.85464e-05 0.1739029 0.000183322 0.2244054 0.2384437 3.95519e-05 1.38342e-05 1.4781e-06 0.0005926798 2.87744e-05 2.95411e-05 0.04318025 0.0001410319 1.24789e-05 2.3911e-05 2.8913e-06 5.88171e-05 4.15819e-05 1.50063e-05 4.6081e-05 0.0003075746 0.009934295 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 80081257 
## 
## solution.v:
##  0.008439594 0.1095152 0.09494183 0.145766 0.2166244 0.003574886 0.001017191 0.00826432 0.03590569 0.0006900282 0.0005348461 0.1615282 0.0163358 0.0951404 0.1017217 
## 
## solution.w:
##  3.75493e-05 4.48517e-05 9.64524e-05 0.1158545 6.43306e-05 0.001499663 4.46579e-05 0.08976218 0.0005093623 3.65776e-05 0.0007021219 4.29494e-05 5.71632e-05 4.866e-05 0.0103801 2.87413e-05 4.32775e-05 0.0007976091 6.48145e-05 0.0001189067 2.11844e-05 6.02421e-05 3.76394e-05 9.458e-07 0.0001492609 7.7843e-05 0.1559072 4.04257e-05 4.96875e-05 5.13139e-05 0.5290802 5.71217e-05 5.76286e-05 8.39048e-05 0.0937549 7.40377e-05 0.0001333851 3.74488e-05 3.8432e-05 2.07899e-05 3.19341e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29006120 
## 
## solution.v:
##  0.1108418 0.02653501 0.003930001 0.2458063 0.1636785 0.2090913 0.005130893 0.001483694 0.004237368 0.003289998 0.003697256 0.03564668 0.08370893 0.08375433 0.01916788 
## 
## solution.w:
##  3.3583e-06 3.3858e-06 2.7032e-06 7.4885e-06 3.906e-06 0.1262496 2.5764e-05 2.0992e-06 2.74626e-05 0.0001744906 0.1234593 8.1319e-06 0.2837464 0.05296796 2.42e-08 0.0009598665 1.32508e-05 2.8297e-06 7.159e-07 4.339e-06 0.3244447 0.02971413 7.5728e-06 3.0744e-06 1.258e-07 2.0361e-06 0.002830615 1.22564e-05 4.2464e-06 2.3408e-06 7.8743e-06 0.0001451545 4.5314e-06 3.5343e-06 1.59659e-05 4.7233e-06 7.66964e-05 7.8129e-06 6.0488e-06 0.05504201 1.4676e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 29950273 
## 
## solution.v:
##  0.008404291 0.07860704 0.003278624 0.1124825 0.2118919 0.005652959 0.04417223 2.0862e-05 0.003029179 0.04240144 0.004206922 0.07835956 0.1411272 0.06511192 0.2012534 
## 
## solution.w:
##  4.8979e-06 5.5754e-06 4.3162e-06 1.13421e-05 0.4989079 3.4069e-06 4.72928e-05 1.13571e-05 9.0585e-06 5.09e-07 0.0002108054 1.93701e-05 1.57787e-05 9.9537e-05 5.52811e-05 3.1e-09 0.1701894 4.90497e-05 1.40913e-05 1.23494e-05 9.01069e-05 5.38328e-05 5.2396e-06 1.90484e-05 1.16098e-05 0.2070312 1.31889e-05 6.8626e-06 5.7715e-06 7.7573e-06 3.863e-06 9.7452e-06 8.46565e-05 4.6144e-06 0.1225276 1.55613e-05 3.12096e-05 4.7196e-06 1.32684e-05 0.0003872084 1.6528e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10341563 
## 
## solution.v:
##  0.04533745 0.01447939 0.0150299 0.04798256 0.01213567 0.006827367 0.1076972 0.005571527 0.1540259 0.07211793 0.2305771 0.00300439 0.03618335 0.1663605 0.08266979 
## 
## solution.w:
##  0.01812311 6.92997e-05 0.1881583 2.19948e-05 8.93495e-05 6.15496e-05 4.77085e-05 0.0521496 2.71101e-05 2.062e-05 7.75718e-05 5.94049e-05 3.54345e-05 1.55002e-05 1.52568e-05 2.50237e-05 2.7087e-05 0.0001396151 3.1265e-05 5.79481e-05 1.40235e-05 4.44073e-05 1.87127e-05 0.0001708141 0.0002569579 8.54373e-05 1.09932e-05 2.33187e-05 0.6823321 5.86275e-05 1.26416e-05 4.9193e-06 1.75355e-05 9.01216e-05 5.6589e-06 5.9143e-05 3.90846e-05 4.75125e-05 1.88537e-05 1.57741e-05 0.05742067 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 324069664 
## 
## solution.v:
##  0.085297 0.000360906 0.03668381 0.002735744 0.01480866 0.0004665842 0.1533345 0.03061387 0.008722059 0.09321181 0.169725 0.1530327 0.01090202 0.02163581 0.2184695 
## 
## solution.w:
##  4.13e-08 2.64e-08 1.124e-07 5.27e-08 5.75e-08 0.4466246 3.39e-08 5.56e-08 5.09e-08 1.715e-07 4.24e-08 3.04e-08 1.875e-07 3.35e-08 4.03e-08 6.32e-08 1.167e-07 4.27e-08 5.83e-08 6.33e-08 3.64e-08 5.05e-08 2.3e-08 2.21e-08 6.6e-08 0.5533729 5.79e-08 5.37e-08 8.41e-08 8.78e-08 2.23e-08 2.83e-08 7.38e-08 9.17e-08 6.18e-08 4.51e-08 7.42e-08 2.827e-07 3.58e-08 4.01e-08 0 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8178566 
## 
## solution.v:
##  0.05446949 0.0001109356 0.03792877 0.02135798 0.0377964 0.001176412 0.05797209 0.0110458 0.1538736 0.1536941 0.01621037 0.2187979 0.04390731 0.01106669 0.1805922 
## 
## solution.w:
##  0.03022451 0.1074818 0.04226105 1.98835e-05 1.7263e-05 6.036e-06 8.3e-09 0.05789478 1.54797e-05 8.86366e-05 5.8943e-06 8.8625e-06 1.48768e-05 0.07996117 4.22438e-05 8.0056e-06 1.35588e-05 0.05114835 0.02785967 0.0004000992 3.1782e-06 0.4630079 9.0362e-06 0.02775783 1.01494e-05 1.8067e-06 4.9161e-06 0.001239726 2.36893e-05 2.76e-08 6.93034e-05 2.07346e-05 9.3998e-06 1.63761e-05 0.110223 4.8548e-06 3.7357e-06 8.669e-06 0.000108223 3.077e-06 2.1847e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 28277325 
## 
## solution.v:
##  0.03134524 7.967e-06 0.03735277 0.07997253 0.009685208 0.1135156 6.57816e-05 0.1884336 0.01889837 0.006968446 0.03464416 0.04654097 0.04776226 0.3128055 0.07200159 
## 
## solution.w:
##  5e-09 7.4e-09 6.1e-09 7.58e-08 3.9e-09 0.05944387 3.17e-08 3.9e-09 1.37e-08 7.9e-09 5.24e-08 1.64e-08 1.79e-08 1.25e-08 0.6452387 1.43e-08 7.3e-09 7.4e-09 8.3e-09 7.1e-09 7.2e-08 2.97e-08 3.155e-07 1e-08 2.71e-08 5.6e-09 2.22e-08 1.64e-08 4.4e-09 5.7e-09 1.7e-08 2.89e-08 4.35e-08 1.9e-09 3.7e-09 0.2953157 7.9e-09 9.4e-09 1.34e-08 4.6e-08 7.334e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16492468 
## 
## solution.v:
##  7.9945e-06 2.4674e-06 5.638e-07 0.001456571 0.008696865 0.01798168 4.0316e-06 0.05012414 7.59083e-05 0.1143298 0.1181051 0.1597734 0.03864744 0.3323181 0.158476 
## 
## solution.w:
##  1.0291e-06 5.407e-07 0.001754008 5.36e-07 2.02989e-05 0.03520294 3.093e-07 0.4262348 2.904e-07 3.5715e-06 2.847e-07 4.649e-07 2.7159e-06 1.366e-07 4.385e-07 1.4341e-06 3.8595e-06 4.914e-07 5.668e-07 3.863e-06 2.585e-07 3.456e-07 3.293e-07 3.905e-07 6.183e-07 6.546e-07 0.1508534 7.419e-07 1.90293e-05 3.5617e-06 2.918e-07 5.121e-07 3.539e-07 0.004177541 0.09371279 0.1891407 5.589e-07 6.864e-07 5.197e-07 4.828e-07 0.09885369 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 926621.4 
## 
## solution.v:
##  0.07063801 0.08562454 0.0645118 1.73828e-05 0.1779392 0.03187951 0.107983 0.04153248 0.002767776 0.005801566 0.0008654216 0.08732109 0.1051353 0.1285775 0.08940548 
## 
## solution.w:
##  0.0323589 0.0002439223 5.0952e-06 1.72546e-05 9.3112e-06 2.7827e-06 0.2812691 1.39351e-05 6.0246e-06 0.03630759 4.6603e-06 1.67244e-05 1.56695e-05 1.94765e-05 2.6332e-06 3.27781e-05 1.51832e-05 8.2421e-06 0.1398939 1.01966e-05 3.0531e-06 1.06602e-05 0.1316187 6.3323e-06 1.70448e-05 1.13187e-05 5.027e-06 0.0001218376 8.817e-06 0.0004586384 1.3558e-05 1.16652e-05 1.20441e-05 7.3193e-06 5.5924e-06 2.9602e-06 3.71509e-05 4.7505e-06 1.36166e-05 0.377364 1.25762e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18937468 
## 
## solution.v:
##  1.2215e-06 0.05758818 0.0001961841 1.4043e-06 0.1347165 0.05656935 0.1669052 0.1180545 0.0651532 0.09132941 0.08377472 0.003630876 0.1507992 0.04203272 0.02924739 
## 
## solution.w:
##  0.0401852 3.50172e-05 1.14e-08 1.87e-08 3.5e-08 1.13e-08 2.9e-09 3.36e-08 1.82e-08 6.85e-08 2.57e-08 1.358e-07 5.23e-08 2.37e-08 1.7e-08 6.237e-07 5.98e-08 3.38e-08 8.49e-08 3.69e-08 9.43e-08 2.26e-08 2.1e-08 3.75e-08 7.01e-08 1.997e-07 1.06e-08 4.86e-08 4.14e-08 5.61e-08 5.4e-09 4.4e-09 1.95e-08 3.91e-08 1.87e-08 1.54e-08 2.19e-08 4.91e-08 4.45e-08 0.9126525 0.04712517 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54208233 
## 
## solution.v:
##  0.00182443 0.01471674 0.03578053 0.04718759 0.0006348993 0.02285094 0.02875648 0.09724705 6.93039e-05 0.2223537 0.001918506 0.09583892 0.253237 0.1765411 0.001042844 
## 
## solution.w:
##  6.9e-09 6.4e-09 7.5e-09 7.8e-09 7e-09 0.8576379 4.2e-09 1.49e-07 4.4e-09 4.7e-09 3.8e-09 7.3e-09 7.8e-09 4.5e-09 1.38e-08 7.2e-09 4.9e-09 5.4e-09 4.26e-08 8.5e-09 4.9e-09 4.1e-09 1.07e-08 4.7e-09 3.21e-08 0.1423616 3e-09 5.9e-09 5.1e-09 3.45e-08 5.4e-09 6.6e-09 4.2e-09 5.1e-09 5.2e-09 0 3.9e-09 3.78e-08 1.6e-08 7.6e-09 8.2e-09
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_loosc <- mspe.test(placebos_loosc, discard.extreme = FALSE)

mspe_test_loosc$p.val
## [1] 0.1627907

LOO 6: UT

Prepare Data (LOO UT)

ds_state_slim_loout <- ds_state_slim %>% filter(state != "UT")


ds_state_slim_loout <- ds_state_slim_loout %>% 
  mutate(state_id = 
           case_when(
             state == "AL" ~ 1,
             state == "AR" ~ 2,
             state == "AZ" ~ 3,
             state == "CA" ~ 4,
             state == "CT" ~ 5,
             state == "FL" ~ 6,
             state == "HI" ~ 7,
             state == "IA" ~ 8,
             state == "ID" ~ 9,
             state == "IL" ~ 10,
             state == "IN" ~ 11,
             state == "KS" ~ 12,
             state == "KY" ~ 13,
             state == "LA" ~ 14,
             state == "MD" ~ 15,
             state == "ME" ~ 16,
             state == "MI" ~ 17,
             state == "MO" ~ 18,
             state == "MS" ~ 19,
             state == "MT" ~ 20,
             state == "NC" ~ 21,
             state == "ND" ~ 22,
             state == "NE" ~ 23,
             state == "NH" ~ 24,
             state == "NJ" ~ 25,
             state == "NM" ~ 26,
             state == "NV" ~ 27,
             state == "NY" ~ 28,
             state == "OH" ~ 29,
             state == "OK" ~ 30,
             state == "OR" ~ 31,
             state == "PA" ~ 32,
             state == "RI" ~ 33,
             state == "SC" ~ 34,
             state == "SD" ~ 35,
             state == "TN" ~ 36,
             state == "TX" ~ 37,
             state == "VA" ~ 38,
             state == "VT" ~ 39,
             state == "WA" ~ 40,
             state == "WI" ~ 41,
             state == "WV" ~ 42,
             state == "WY" ~ 43))




data_prep_out_loout <- dataprep(
  foo = ds_state_slim_loout,
  predictors = c("prop_arts", "prop_edu", "prop_env", "prop_health", 
                 "prop_hso", "prop_int", "prop_socialbenefit", 
                 "prop_religion", "median_revenues",
                 "median_assets_mil", "median_liabilities_mil"),
  special.predictors = list(
    list("median_contributions", 2013:2018, c("median"))),
  dependent = "median_contributions",
  unit.variable = "state_id",
  time.variable = "year",
  treatment.identifier = 3,
  controls.identifier = unique(ds_state_slim_loout$state_id[ds_state_slim_loout$state_id != 3]),
  time.predictors.prior = 2013:2018,
  time.optimize.ssr = 2013:2018,
  time.plot = 2013:2023,
  unit.names.variable = "state")

Generate Weights (LOO UT)

synth_out_loout <- synth(
  data.prep.obj = data_prep_out_loout)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 35244388 
## 
## solution.v:
##  4.76619e-05 2.29538e-05 2.55062e-05 1.3819e-06 0.04599815 0.1746621 0.08100124 1.1582e-06 0.01099868 0.2146686 0.1606808 0.3118917 
## 
## solution.w:
##  4.5352e-06 2.8567e-06 0.1612128 4.6378e-06 5.13699e-05 0.6037099 4.6684e-06 1.7879e-06 2.40033e-05 2.2614e-06 1.79629e-05 4.8739e-06 6.0097e-06 8.9426e-06 8.1529e-06 5.0264e-06 4.0073e-06 2.49964e-05 6.7391e-06 2.4419e-06 3.1931e-06 5.8225e-06 4.3117e-06 1.30012e-05 6.75688e-05 0.2239249 0.01079587 4.2515e-06 5.0353e-06 5.8533e-06 4.65e-06 3.0132e-06 1.99782e-05 3.8932e-06 2.3277e-06 1.2831e-05 4.0831e-06 3.5062e-06 1.74e-07 3.9925e-06 3.7688e-06 4e-10
synth_AZ_median_contributions_loout <- as.numeric(data_prep_out_loout$Y0 %*% synth_out_loout$solution.w)

Hypothesis Testing (LOO UT)

placebos_loout <- generate.placebos(
  dataprep.out = data_prep_out_loout,
  synth.out = synth_out_loout,
  Sigf.ipop = 5)
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15015614 
## 
## solution.v:
##  0.06799316 0.1330883 0.04405012 6.65e-08 0.2564203 0.01351025 0.2856426 8.3456e-06 3.04645e-05 0.0002920057 7.1606e-06 0.1989572 
## 
## solution.w:
##  0.1307894 0.001484678 0.003700279 0.004618385 0.0005920344 0.02567582 0.00270339 0.004007987 0.008095937 0.008477228 0.007804926 0.003926265 0.01129022 0.003281849 0.005590273 0.007347854 0.06172963 0.005564371 0.003922952 0.01026292 0.01940297 0.004633372 0.03323371 0.002269459 0.003161938 0.002109855 0.01074164 0.00579323 0.00317411 0.006628217 0.002566399 0.006035205 0.006988355 0.004837544 0.003895324 0.1512773 0.002015415 0.001917121 0.0119953 0.4049334 0.001523735 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 38344257 
## 
## solution.v:
##  0.03020412 0.1745894 0.1131028 0.01675619 0.2559945 0.003281241 0.08708243 0.00197902 9.97129e-05 0.0001978365 0.0003240471 0.3163888 
## 
## solution.w:
##  0.006091933 4.29639e-05 3.22947e-05 2.22025e-05 4.9679e-06 2.9e-07 0.0001037997 2.1583e-05 0.0001016691 8.2647e-06 0.0001464717 0.0002436319 1.42648e-05 7.2212e-06 8.03855e-05 0.0001120081 2.1825e-05 8.4917e-06 0.0008627585 2.5872e-06 8.4329e-06 3.3904e-06 0.0006503977 1.66997e-05 1.34095e-05 1.55687e-05 0.01052455 4.64604e-05 3.68876e-05 0.644666 0.000102006 3.11935e-05 1.86646e-05 2.95562e-05 3.1706e-05 2.84931e-05 1.18244e-05 6.03838e-05 8.3853e-05 0.3353065 0.0003843908 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 3014714 
## 
## solution.v:
##  0.1200174 0.1833593 1.513e-07 0.02959071 0.008233795 2.153e-07 0.1242306 6.539e-07 0.1645996 1.9252e-06 0.0001554611 0.3698101 
## 
## solution.w:
##  3.59e-08 3.54e-08 1.82e-08 8.68e-08 0.3596347 1.05e-08 0.2570025 0 8.17e-08 4.8e-09 2.55e-08 3.2655e-06 1.93e-08 1.87e-08 3.72e-08 5.63e-08 6e-10 3.27e-08 2.341e-07 1.09e-08 1.28e-08 2.3e-08 1.01e-08 1.045e-07 3.97e-08 0.1401786 3.13e-08 7.34e-08 5.064e-07 1.49e-08 1.365e-07 0.2431756 1.82e-08 5.69e-08 3.429e-07 3.2e-09 3.1e-09 3.2701e-06 2.56e-08 1.48e-08 1.18e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7656672 
## 
## solution.v:
##  0.0031634 1.46e-08 0.08416484 2.8e-09 0.1225897 0.01974883 0.05667967 0.09053015 0.2076139 0.2401027 0.02456542 0.1508414 
## 
## solution.w:
##  8.849e-07 2.1947e-06 1.4692e-06 1.0432e-06 2.1376e-06 0.08116804 1.8192e-06 1.5872e-06 1.6857e-06 8.6e-09 2.6758e-06 9.904e-07 3.5445e-06 0.2438781 1.1578e-06 1.4061e-06 1.1736e-06 1.821e-06 2.0905e-06 0.2929821 3.2151e-06 0.03774886 6.4559e-06 7.92e-07 1.711e-07 0.04615483 1.6706e-06 1.2126e-06 1.8895e-06 5.6601e-06 0.1887298 1.1451e-06 3.7443e-06 7.073e-07 1.2659e-06 0.0009131253 0.1083624 1.7702e-06 1.6587e-06 7.392e-07 2.896e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15146762 
## 
## solution.v:
##  0.00832442 2.035e-07 0.02759925 0.07060133 0.2568995 0.06261179 0.1318163 0.005640443 5.61028e-05 0.06616274 0.09167312 0.2786148 
## 
## solution.w:
##  0.0003799272 0.0001786933 0.2845072 0.0002221018 0.06132854 0.0002283477 5.1803e-06 0.0004712616 0.0001456546 0.0007890973 0.0002224012 0.000169322 0.001774384 0.0008060841 0.0002032121 0.0002001748 0.003005621 0.05669542 0.0002859351 8.38329e-05 0.0002685679 0.0001702853 0.1904378 0.001387571 0.000326885 0.01127529 0.0001453305 0.0003400422 0.0006911121 0.0001655656 0.0001286138 0.03112102 0.0001458953 0.3471204 0.001371441 0.002244509 0.0004462065 0.0002654963 0.0001393849 2.22751e-05 8.38986e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 136603711 
## 
## solution.v:
##  0.01633037 0.165007 0.1836289 0.000121525 0.0008166366 0.0810152 0.1246274 0.04897139 0.00825811 0.008447 0.00831243 0.3544641 
## 
## solution.w:
##  8.63e-08 6.57e-08 0.5269169 1.655e-07 1.621e-07 1.193e-07 2e-10 6.352e-07 6.895e-07 2.647e-07 9.09e-08 1.0306e-06 2.079e-07 1.448e-07 3.141e-07 3.222e-07 1.24e-07 8.131e-07 1.458e-07 1.261e-07 2.623e-07 9.11e-08 3.27e-08 3.1446e-06 4.63423e-05 0.005092158 2.741e-07 2.232e-07 2.497e-07 1.035e-07 2.621e-07 1.686e-07 4.466e-07 1.738e-07 1.551e-07 1.39e-07 0.06446793 0.00964897 1.772e-07 1.544e-07 0.3938161 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45063759 
## 
## solution.v:
##  8.1277e-06 8e-09 0.0008008097 9.2585e-06 0.0006043209 2.186e-07 1.13024e-05 3.4237e-06 0.0486241 3.53e-08 0.355018 0.5949204 
## 
## solution.w:
##  7.737e-07 8.052e-07 2.411e-07 7.543e-07 4.181e-07 2.11e-08 2.62e-07 4.139e-07 4.903e-07 7.551e-07 9.203e-07 4.45e-07 7.027e-07 5.409e-07 5.523e-07 5.138e-07 7.763e-07 4.38e-07 4.249e-07 6.63e-07 2.7e-09 1.1467e-06 0.9999787 4.208e-07 1.086e-07 1.476e-07 7.727e-07 5.151e-07 3.358e-07 1.0206e-06 3.794e-07 5.807e-07 6.939e-07 3.124e-07 4.575e-07 8.658e-07 2.627e-07 1.863e-07 1.0313e-06 9.827e-07 1.501e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45020627 
## 
## solution.v:
##  0.1040539 0.009658443 0.05573632 0.08638682 0.1434144 0.02548428 0.06653755 0.1457494 0.005103605 0.04061096 0.02312854 0.2941357 
## 
## solution.w:
##  7.25e-08 1.939e-07 -1e-10 2.223e-07 4.032e-07 4.49e-08 1.66e-08 1.741e-07 2.89e-08 5.63e-08 1.583e-07 5.2e-08 6.731e-07 0.001594083 6.42e-08 9.87e-08 2.5177e-06 1.5534e-05 8.123e-07 4.477e-07 3.4e-09 1.775e-07 0.0001447938 3.52e-08 0.008778375 4.29e-08 5.47e-08 5.29e-08 0.5375894 4.48e-07 3.626e-07 0.04978962 5.23e-08 0.1859469 1.21e-08 8.12e-08 3.59e-07 2.28e-08 7.83e-08 2.483e-07 0.2161332 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 30928334 
## 
## solution.v:
##  0.0003956902 0.004478387 0.01417635 0.05199103 0.07727818 0.01158329 0.003183308 0.1119542 0.02598288 0.05856178 0.5792681 0.06114678 
## 
## solution.w:
##  3.0138e-06 3.1532e-06 3.73621e-05 6.3508e-06 0.0001413875 0.07435421 4.6559e-06 7.4712e-06 1.05856e-05 0.09782235 4.0266e-06 0.00101811 2.7232e-06 6.2e-09 7.7354e-06 4.68638e-05 2.2204e-06 2.7881e-06 4.6706e-06 0.166483 6.1118e-06 2.0094e-06 3.4539e-06 1.16145e-05 0.01405185 0.3413593 8.5849e-06 4.54676e-05 5.8313e-06 9.4008e-06 0.02961797 8.3726e-06 2.16902e-05 3.9885e-06 0.2748551 2.2725e-06 2.9486e-06 1.01352e-05 3.4922e-06 5.1212e-06 2.7374e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2990020 
## 
## solution.v:
##  0.2140497 0.004218405 0.0005006985 0.01311604 0.03884164 0.01936771 0.0003310904 0.01945158 0.1460412 0.06163828 0.1651434 0.3173003 
## 
## solution.w:
##  0.0001050779 0.003853352 1.602e-07 0.002541536 1.13192e-05 2.31287e-05 0.0040283 -1.8e-09 3.12194e-05 4.81271e-05 9.91858e-05 6.71187e-05 2.19855e-05 5.45613e-05 0.0001666362 0.6670058 1.89708e-05 2.73855e-05 2.14591e-05 0.0001705597 0.02694901 0.0001254473 2.8724e-05 2.34447e-05 1.0104e-06 3.58088e-05 0.0004556911 6.7703e-06 8.3216e-06 0.0001154021 0.0002210251 1.75899e-05 0.0003808475 3.786e-07 2.25988e-05 0.1039974 2.60693e-05 0.05971376 0.001223589 2.02408e-05 0.128331 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 82086129 
## 
## solution.v:
##  7.37767e-05 0.1276602 0.1184344 0.01237035 0.02883371 0.01797719 0.1607994 0.02842341 1.43763e-05 0.003283584 0.2232934 0.2788362 
## 
## solution.w:
##  2.69e-08 4.92e-08 5.16e-08 1.081e-07 5.11e-08 8.83e-08 2.2e-07 1.17e-08 1.577e-07 5.49e-08 7.86e-08 9.88e-08 5.83e-08 3.95e-08 4.54e-08 9.85e-08 0.5093931 2.48e-08 4.68e-08 1.265e-07 0.4209054 3.88e-08 0.04263323 5.25e-08 3.9e-08 0.02706571 5.8e-08 9.99e-08 2.13e-08 5.68e-08 2.26e-08 1e-10 2.773e-07 4.66e-08 6.88e-08 9.27e-08 1.13e-07 3.28e-08 2.66e-08 4.41e-08 1.03e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 5652636 
## 
## solution.v:
##  0.3738811 0.007279873 0.06264144 0.1963069 0.08093126 0.06564599 0.01110833 0.06804534 0.1257964 0.000601689 0.002030754 0.005730921 
## 
## solution.w:
##  0.2631638 0.03543338 0.0001269414 0.0001934729 0.0002310248 0.00026469 0.3587605 9.32484e-05 0.0002330805 0.0001099888 0.00109981 0.0004258248 5.28519e-05 0.0001562442 0.0001763115 0.0002041292 0.0005390064 5.26878e-05 0.0002494422 0.1922411 2.6353e-06 0.02892847 0.01831836 0.000284144 0.0001163983 3.58183e-05 0.0002029086 0.00113209 6.93096e-05 0.004141389 0.005102478 0.0002265494 0.0005406618 0.001254883 0.0009868655 6.32101e-05 0.0002152985 9.68661e-05 0.0001350187 9.90596e-05 0.08424005 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 59298725 
## 
## solution.v:
##  0.1078467 0.06589088 0.09199116 0.0188897 0.0276454 0.01640772 0.03520102 0.1002885 0.09999343 0.1382064 0.0255697 0.2720693 
## 
## solution.w:
##  6.397e-07 1.2796e-06 0.05393604 9.773e-07 4.123e-07 0.09629246 1.2223e-06 5.335e-07 0.001740703 0.1788632 1.42509e-05 9.935e-07 5.735e-07 4.795e-07 9.544e-07 0.1617153 8.6469e-06 5.093e-07 1.532e-07 7.497e-07 1.297e-06 7.443e-07 1.0001e-06 2.9894e-06 3.63608e-05 8.067e-07 0.2722244 3.447e-07 4.803e-07 1.0917e-06 1.5222e-06 0.1979231 3.195e-06 1.319e-07 2.288e-07 6.557e-07 1.0263e-06 8.267e-07 7.698e-07 1.6635e-06 0.03721728 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19822879 
## 
## solution.v:
##  0.3056377 0.001255065 0.3195172 0.003965201 0.06199213 0.07177679 0.001236669 0.01194206 0.01182397 0.09732253 0.04890599 0.06462472 
## 
## solution.w:
##  3.18e-08 5.91e-08 4.69e-08 1.25e-08 1.497e-07 1.22e-08 1.15e-08 0.1794581 6.26e-08 3.46e-08 1.79e-08 2.25e-08 2.21e-08 2e-10 9.53e-08 7.65e-08 4.46e-08 3.31e-08 7.8e-08 7e-10 1.02e-08 2.49e-08 3e-10 1.25e-08 9.4e-08 8.591e-07 3.67e-08 2.7e-08 6.55e-08 0.3765962 2.4e-09 3.37e-08 2.08e-08 2.667e-07 2.81e-08 0.4439225 1.62e-08 3.48e-08 4.09e-08 2.08349e-05 5e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 1071616 
## 
## solution.v:
##  0.1347153 0.1896541 0.02894868 0.11583 0.0004265782 0.003780239 0.1801403 1.58313e-05 0.005209507 0.002222109 0.0001742531 0.3388831 
## 
## solution.w:
##  7.8871e-06 1.00375e-05 8.1602e-06 0.1088856 1.03043e-05 1.28e-08 2.15167e-05 0.0002025466 1.75488e-05 4.6687e-06 0.05136953 1.70038e-05 8.0753e-06 9.055e-07 8.8737e-06 7.5604e-06 1.74709e-05 0.03201356 1.03157e-05 0.0008436799 1.18897e-05 7.43857e-05 0.2602842 1.00898e-05 4.7108e-06 8.9327e-06 1.00884e-05 6.8316e-06 4.4512e-06 8.22548e-05 0.0004831957 6.1478e-06 1.44295e-05 6.9329e-06 7.9547e-06 1.01725e-05 0.5454802 6.7513e-06 9.0951e-06 7.6544e-06 4.2952e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 31428136 
## 
## solution.v:
##  0.2783145 0.0004079395 0.09050885 0.1827523 0.005031463 0.0643212 0.05151311 0.05869207 0.0001101084 7.95467e-05 0.2643677 0.003901253 
## 
## solution.w:
##  7.6854e-06 4.643e-06 3.97651e-05 3.27776e-05 5.739e-05 3.51136e-05 7.48178e-05 2.37243e-05 3.36707e-05 0.4320237 2.4011e-05 0.00016476 7.20624e-05 4.41877e-05 1.61255e-05 6.03399e-05 2.44909e-05 2.15069e-05 3.73527e-05 3.84185e-05 5.67322e-05 0.2355611 2.30553e-05 6.3038e-05 4.97163e-05 0.07051253 0.0001981551 0.0001186642 3.27796e-05 4.19e-08 3.93413e-05 2.68819e-05 6.50771e-05 0.1204315 6.48171e-05 8.814e-06 2.84868e-05 3.39765e-05 0.0534937 0.08635445 5.605e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 15710290 
## 
## solution.v:
##  0.1501736 1.06e-08 0.01190991 0.2023288 0.1083451 1e-10 0.00890072 0.2169463 0.06640189 0.1502291 0.01015452 0.07461009 
## 
## solution.w:
##  1.88861e-05 0.0001924425 9.80575e-05 9.90582e-05 2.5086e-06 3.78998e-05 8.2627e-05 0.003646947 3.5539e-06 0.5075522 7.83907e-05 9.98291e-05 0.0001779294 0.07703271 4.84723e-05 0.0001241256 0.0002629813 4.5331e-05 0.00052728 0.05783512 6.94945e-05 6.09931e-05 0.0002709337 4.57952e-05 9.362e-07 1.59667e-05 0.0002794977 0.0004154846 7.74004e-05 0.001861325 0.0001271176 0.0001254887 0.0001180946 0.2440267 0.0001025752 0.0001862673 2.7071e-05 9.49907e-05 9.24127e-05 0.1039868 4.82376e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16485517 
## 
## solution.v:
##  0.1022203 4.34492e-05 0.1649635 0.2545825 1.51266e-05 0.07321947 0.00107023 9.29532e-05 0.1248465 0.06439228 0.08960392 0.1249497 
## 
## solution.w:
##  0.3074669 4.24e-08 1.65e-07 8.65e-08 2.892e-07 3.6e-08 1.549e-07 2.554e-07 2.646e-07 4.628e-07 0.1429989 1.469e-07 2.899e-07 1.224e-07 3.58e-08 1.877e-07 7.595e-07 7.97e-08 2.493e-07 7.49646e-05 1.935e-07 5.68e-08 0.05097346 6.98e-08 0.09384117 3.44e-08 1.999e-07 0.04932501 1.324e-07 9.42e-08 4.43e-08 2.697e-07 1.782e-07 1.194e-07 1.0549e-06 2.086e-07 3.51e-08 1.33e-07 1.098e-07 0.3553129 1.028e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 19906254 
## 
## solution.v:
##  0.2682838 0.3125837 0.01757736 0.05334418 0.0005668975 9.20547e-05 0.01452944 0.001077946 0.1345894 0.07401456 0.01892635 0.1044144 
## 
## solution.w:
##  3.5784e-06 6.926e-07 2.273e-07 3.428e-07 6.149e-07 1.662e-07 1.4833e-06 6.153e-07 2.279e-07 1.361e-07 7.352e-07 1.407e-06 4.316e-07 1.5033e-06 4.00247e-05 7e-10 3.752e-07 6.076e-07 4.846e-07 0.1096196 0.04768948 1.4134e-06 3.796e-07 6.3987e-06 0.276119 6.93e-08 5.525e-07 4.786e-07 1.527e-06 3.122e-07 1.076e-07 7.911e-07 4.795e-07 6.153e-07 4.271e-07 9.345e-07 0.03585789 1.504e-07 0.2783675 0.02792347 0.2243547 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 2467995 
## 
## solution.v:
##  0.0723568 1.94074e-05 0.002965851 0.1095625 0.03515585 0.1556307 0.006487724 0.008148205 0.1971368 0.03581891 0.003567414 0.3731498 
## 
## solution.w:
##  2.0213e-05 0.1092794 0.0002281814 0.0005125065 0.0003320775 0.0002163467 0.0007251872 0.1695997 0.0003233007 0.1705861 0.0003252404 0.0007572924 0.00117347 0.0002858274 0.0003188907 0.0003250527 0.00102703 0.0006529038 0.0003726307 0.0001978291 0.0006364717 0.00033642 0.0006699476 0.0002745455 5.36345e-05 0.0001359177 0.001368764 0.002250466 0.0002239599 0.0006161749 0.0012852 0.03730955 0.0005180876 0.2291833 0.001479046 0.1302662 0.0001653053 1.6136e-05 0.0006937246 0.0002407443 0.1350173 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 65436038 
## 
## solution.v:
##  0.03266868 0.00057458 0.001247202 0.005973626 0.002855411 0.007085568 0.01800852 0.05381199 0.01466855 0.2938282 0.07387227 0.4954054 
## 
## solution.w:
##  7.1e-09 1.14e-08 3.1e-09 2.5e-09 4.6e-09 2.3e-09 0.3765429 5.7e-09 7.5e-09 9.5e-09 1.78e-08 9.6e-09 6.3e-09 1e-08 1.6e-09 6.4e-09 9.8e-09 9.1e-09 7e-09 6e-09 8.723e-07 4e-09 7.6e-09 3.1e-09 2.5e-09 3.2e-09 9.9e-09 7.3e-09 4.9e-09 0.4086771 9.3e-09 5.5e-09 0.2147789 4.2e-09 5e-09 8.8e-09 4.3e-09 3.4e-09 1.01e-08 2.15e-08 4.7e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 43144035 
## 
## solution.v:
##  0.09916296 0.2072693 0.1246495 0.1206764 0.1520318 0.002325724 0.04031571 0.03945049 0.09530594 0.0004218763 0.01616047 0.1022297 
## 
## solution.w:
##  9.032e-07 3.7e-09 1.08e-08 9.8e-09 2.17e-08 2.51e-08 0.5103125 7e-10 1.61e-08 0.1581272 0.248069 1e-10 1.62e-08 2.85e-08 1.77e-08 6.95e-08 2.43e-08 1.16e-08 0.05364997 9.9e-09 0.02983962 7.4e-09 1e-09 6.9e-08 0 2.09e-08 1.54e-08 3.27e-08 1.33e-08 5.9e-09 5.8e-09 1.39e-08 1.104e-07 2.08e-08 2.31e-08 2.05e-08 2.92e-08 1.73e-08 4.35e-08 4.31e-08 1.4e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 8606008 
## 
## solution.v:
##  0.009409383 0.01505011 0.0009980341 0.217469 0.000530747 0.2248428 0.004782038 0.01915893 0.00251711 0.1270111 0.003126276 0.3751045 
## 
## solution.w:
##  6.05e-08 1.106e-07 3.16e-08 0.08189341 2.86e-08 2.25e-08 0.5049158 4.26e-08 2.55e-08 2.98e-08 2.77e-08 1.344e-07 3.91e-08 5.87e-08 0.1118608 5.8e-08 2.77e-08 3.34e-08 7.32e-08 3.63e-08 1.1e-08 3.79e-08 0.03340832 9.92e-08 6.7e-09 2.41e-08 6.9e-08 2.25e-08 8.17e-08 0.1433647 1e-10 3.99e-08 2.54e-08 1.25e-08 2.23e-08 5.97e-08 0.1245533 3.65e-08 2.2076e-06 1.265e-07 4.06e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 251012825 
## 
## solution.v:
##  0.0008171772 0.0001441499 0.1877551 0.1374206 0.0616858 0.01416425 0.07941104 0.06257956 0.1216975 0.001114388 0.1025501 0.2306603 
## 
## solution.w:
##  2.34e-08 1.46e-08 2.405e-07 6.32e-06 9.112e-07 1.296e-07 0.2120015 2.781e-07 5.399e-07 4.6e-08 0.06515711 0.6119009 6.89e-08 2.1414e-06 1.64081e-05 1.648e-07 1.067e-07 2.723e-07 1.238e-07 2.035e-07 0.1028938 2e-10 0.002889995 1.549e-07 8e-09 2.0942e-06 1.421e-07 8.84e-08 1.696e-07 0.005119554 2.562e-06 2.219e-07 1.681e-07 1.032e-07 1.79e-07 1.69e-06 1.128e-06 5.47e-08 2.87e-07 8.26e-08 4.73e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 56023212 
## 
## solution.v:
##  0.009058641 0.0001655841 0.09339233 3.99628e-05 0.09606384 0.03597082 0.1440411 0.1322272 0.07628573 0.1218777 0.1033751 0.1875021 
## 
## solution.w:
##  2.17986e-05 7.3087e-06 6.601e-06 4.9348e-06 6.3857e-06 5.365e-07 5.14124e-05 2.6846e-06 6.1364e-06 2.8626e-06 0.06099927 2.00577e-05 2.13825e-05 8.192e-06 3.7967e-06 1.33337e-05 3.7453e-06 0.1050275 0.1540824 4.6537e-06 2.732e-06 3.4543e-05 3.81423e-05 5.03617e-05 0.275744 3.883e-06 1.31138e-05 3.4704e-06 7.7216e-06 2.7834e-06 1.0089e-06 0.2132597 4.6966e-06 2.5813e-06 4.2662e-06 6.851e-06 0.1900009 4.2686e-06 2.58498e-05 0.0004924843 1.492e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 309020189 
## 
## solution.v:
##  0.004301166 0.09573249 0.1865099 0.05193233 0.07039088 2.51064e-05 1.69031e-05 0.06495847 6.65227e-05 0.02917263 0.1318625 0.3650311 
## 
## solution.w:
##  5.58e-08 1.41e-08 1.37e-08 3.59e-08 4.682e-07 4.40082e-05 4.36e-08 9.9e-09 1.894e-07 1.351e-07 4.079e-07 6.35e-08 4.29e-08 8.531e-07 2.538e-07 6.532e-07 1.412e-07 7.66e-08 0.002477846 2.02e-08 2.5091e-06 2.773e-07 4.15e-08 1.21e-08 6.965e-07 6.201e-07 4.85e-08 3.69e-08 1.405e-07 1.3e-08 8.2e-09 3.69e-08 4.084e-07 0.3825015 9.5e-09 5.12e-08 2.31637e-05 9.52e-08 1.061e-07 2.6377e-06 0.6149422 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 16792612 
## 
## solution.v:
##  0.2523211 0.06009312 0.0112749 0.1593056 0.1415962 0.02059306 0.08393939 0.01066236 7.8536e-05 0.06019318 0.0008407732 0.1991018 
## 
## solution.w:
##  1.75e-07 1.017e-07 4.925e-07 8.234e-07 5.278e-07 0.4122543 1.5e-09 1.649e-07 1.1614e-06 8.068e-07 0.03021299 3.049e-07 3.291e-07 0.01993816 1.208e-06 6.088e-07 4.604e-07 2.766e-07 4.067e-07 3.087e-07 1.21e-08 8.917e-07 3.317e-07 1.559e-07 3.625e-07 2.568e-07 3.963e-07 5.089e-07 3.39e-07 5.842e-07 3.5383e-06 2.474e-07 2.1897e-06 4.302e-07 5.397e-07 0.2556015 0.2819728 6.758e-07 3.626e-07 2.39e-08 1.747e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 4271568 
## 
## solution.v:
##  1.29047e-05 0.0007229445 0.3731496 0.01246278 2.0302e-06 0.1144317 0.05844532 0.005632736 0.0008589195 0.01835876 0.03054349 0.3853788 
## 
## solution.w:
##  1.1882e-06 3.889e-07 7.096e-07 5.445e-07 6.51e-07 4.097e-07 0.1041756 2.938e-07 1.9828e-06 0.1623092 1.4186e-06 9.79e-07 0.288208 2.672e-07 2.832e-07 1.0253e-06 1.9119e-06 1.0847e-06 2.212e-07 9.209e-07 3.628e-07 0.1893066 5.491e-07 7.57e-07 3.756e-07 3.73e-07 0.03432782 1.2686e-06 3.116e-07 0.2205403 1.1431e-06 5.6e-07 0.001108036 1.0228e-06 9.959e-07 4.772e-07 3.765e-07 5.091e-07 1e-10 7.661e-07 3.163e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 10154702 
## 
## solution.v:
##  0.03764629 0.00212138 0.1634385 0.05908759 0.0004819899 0.09318454 0.006961403 0.142965 0.0002079601 0.309174 0.08006723 0.104664 
## 
## solution.w:
##  5.8258e-06 9.503e-07 1.19e-08 1.99e-08 1.58e-08 1.46e-08 9.29e-08 2.39e-08 2.89e-08 1.4e-09 9.42e-08 1.776e-07 7.364e-07 1.53e-08 1.16e-08 3.85e-08 0.1678768 2.2895e-06 1.9e-08 4.33e-08 0.03812284 0.04558397 2.12e-08 3.7e-08 2.85e-08 3.44e-08 8.3e-09 9.96e-08 1.72e-08 3.19e-08 1.63e-08 8.58e-08 2.93e-08 1.135e-07 0.7484051 1.39e-08 1.28e-08 1.66e-08 4.26e-08 2.323e-07 5.44e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 42901441 
## 
## solution.v:
##  0.2145542 0.2977425 9.0718e-06 0.02293388 0.04465602 0.03188492 9.06231e-05 0.002688107 0.1636216 0.06088322 0.0100347 0.1509012 
## 
## solution.w:
##  0.0001338639 0.0001309777 0.1566584 6.63858e-05 0.1361441 5.1e-08 9.46943e-05 0.1186717 0.0001254666 0.0001757077 7.02591e-05 8.55355e-05 0.0001140121 1.231e-07 4.02069e-05 0.08769575 0.0001482543 0.0001146667 0.0001535344 6.88332e-05 0.0001387286 8.8774e-05 8.43799e-05 9.10401e-05 0.0001554845 0.01069833 9.7613e-05 0.0001314793 0.0001116869 5.006e-07 2.21967e-05 8.92059e-05 7.32685e-05 8.56071e-05 0.0001005896 0.0001162885 2.87576e-05 0.3850969 0.09751882 0.00455627 2.1495e-05 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 9677555 
## 
## solution.v:
##  0.2661687 1.2486e-06 0.1814885 5.8094e-06 0.001402863 0.01383105 0.0194002 0.123522 0.005732996 0.09534894 1.05628e-05 0.2930872 
## 
## solution.w:
##  1.54577e-05 0.08144015 1.09236e-05 8.6897e-06 1.70671e-05 3.252e-06 0.08126322 4.7971e-06 0.000210632 6.00488e-05 0.0001141498 1.18026e-05 1.9445e-05 2.37561e-05 3.7031e-06 2.46443e-05 0.0001450465 2.32038e-05 3.9922e-06 1.74424e-05 0.3951986 4.80184e-05 2.55e-08 0.1322698 4.3371e-06 4.9795e-06 0.01139015 5.68217e-05 6.37446e-05 4.9562e-06 0.2965032 8.8442e-06 0.0009029827 3.11759e-05 3.2375e-05 3.46481e-05 3.5373e-06 7.1856e-06 1.02392e-05 2.41e-08 2.9497e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 73323273 
## 
## solution.v:
##  0.0002791416 0.3505403 0.1166975 0.128019 0.02812375 0.001057546 0.07691135 0.0002941238 0.01365112 0.0001607796 0.002667705 0.2815976 
## 
## solution.w:
##  4.97e-08 3.34e-08 1.23e-08 6.033e-07 1.288e-07 1.10913e-05 7.83e-08 0.257967 7.064e-07 3.23e-08 4.434e-07 1.293e-07 5.35e-08 1.843e-07 3.34448e-05 5.45e-08 6.61e-08 3.137e-07 8.73e-08 8.24e-08 2.787e-07 6.83e-08 1.23e-08 0.2933978 7.68e-08 8.4e-08 0.2983189 4.87e-08 6.56e-08 5.7e-08 0.1501205 1.008e-07 1.535e-07 1.104e-07 8.05e-08 5.77e-08 0.0001466532 2.54e-08 5.43e-08 1.061e-07 7.95e-08 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 47313315 
## 
## solution.v:
##  0.001094106 0.1401688 0.2720804 0.4551751 0.005522597 1.12502e-05 8.5356e-06 0.03753927 0.001290745 0.06918514 0.001260417 0.01666366 
## 
## solution.w:
##  0.02663234 0.0002701837 0.305361 6.15682e-05 0.0006994118 0.0001350792 0.0001133305 0.2597661 0.0001263202 0.0001322075 0.0001480209 0.000188779 0.0001846859 0.0001133811 4.99816e-05 0.0001635986 0.0001553182 0.002528625 0.0001631313 0.0002351801 3.8804e-05 0.0001147514 8.45385e-05 0.2679869 0.009651686 0.002929491 0.0001002939 0.0001239169 0.0003148156 3.126e-07 6.34424e-05 3.85255e-05 7.65372e-05 0.0009395613 0.1195673 0.000175208 0.0001259163 0.0001056546 0.0001080108 0.0001156114 0.000110555 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 43317995 
## 
## solution.v:
##  2.6e-09 0.221657 0.1030449 0.01307251 4.28e-08 0.1489538 0.01262496 0.05512078 1.018e-06 0.0001647514 0.1139074 0.3314528 
## 
## solution.w:
##  2.50941e-05 2.7418e-05 1.284e-05 1.77574e-05 2.18325e-05 1.28792e-05 3.9962e-05 6.4346e-06 0.1908921 0.0002007233 0.05925581 2.70246e-05 0.1445617 3.6786e-05 1.38146e-05 4.96998e-05 1.09775e-05 4.53606e-05 1.3163e-05 2.10692e-05 2.2e-08 0.0001516239 1.84945e-05 1.83995e-05 1.65033e-05 2.00788e-05 0.0373591 0.1439272 4.8217e-05 1.09792e-05 7.086e-07 7.4202e-06 1.71856e-05 4.0499e-05 2.48022e-05 2.26971e-05 1.35057e-05 1.49949e-05 2.78604e-05 0.4229579 9.2839e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 20780085 
## 
## solution.v:
##  0.4418899 0.06535433 0.006298037 0.05484503 0.01645231 0.005182594 0.006096545 0.003777569 0.001173849 0.003810096 0.01535113 0.3797686 
## 
## solution.w:
##  7.021e-07 1.6e-09 2.359e-07 1.13e-07 1.6995e-06 6.45e-08 1.22e-07 0.2075551 4.387e-07 3.717e-07 1.992e-07 2.611e-07 2.741e-07 1.1891e-06 1.19e-07 3.352e-07 0.4965756 5.8188e-06 3.226e-07 1.0264e-06 1.645e-07 1.59e-07 8.97e-08 5.725e-07 1.058e-07 0.295758 1.292e-07 2.936e-07 1.58418e-05 2.398e-07 2.774e-07 1.221e-07 1.0066e-06 3.165e-07 1.6769e-06 4.922e-07 5.96e-08 1.521e-07 2.316e-07 7.61017e-05 1e-10 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 12399478 
## 
## solution.v:
##  0.0004109481 0.07369665 0.009627484 0.2803505 0.002844522 0.001817402 0.2878293 0.01876286 0.001954421 0.004282752 0.3129869 0.005436352 
## 
## solution.w:
##  5.30039e-05 8.44e-08 0.1759186 2.03e-08 4.77e-08 2.58e-08 2.25e-08 0.1374774 1.77e-08 1e-10 9.2e-09 3.21e-08 2.69e-08 1.04e-08 8.9e-09 2.32e-08 2.31e-08 1.34e-08 1.82e-08 5.59e-08 7.9e-09 7e-09 1.67e-08 3.38e-08 3.95e-08 1.73e-08 1.28e-08 2.13e-08 0.6865496 7.31e-08 1.15e-08 7.6e-09 2.945e-07 1.09e-08 4.91e-08 3.39e-08 1.67e-08 8.93e-08 1.93e-08 1.03e-08 1.34e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 7735937 
## 
## solution.v:
##  0.01630193 0.00165795 2.6821e-05 0.002504038 0.3250822 0.003134164 0.2756077 0.1183304 0.003930478 0.0006899091 0.2078458 0.04488868 
## 
## solution.w:
##  0.0004989187 0.0001610875 0.0279744 0.0002264371 0.0003493486 0.0002167481 0.0008430679 0.000191325 0.0002937803 0.02805361 0.1170092 0.0001402015 0.0002172408 0.2561565 0.0001201039 0.0001373991 0.0002937073 0.006978443 0.0002901572 0.000289297 9.32411e-05 0.3200219 5.24397e-05 0.06398905 0.0002502243 0.000123887 0.01142936 0.0002790074 0.0004701727 0.0002622131 3.69412e-05 3.65845e-05 0.06966572 0.0001865549 0.0002556347 0.09186823 0.0001332317 0.0002144498 0.0001415438 3.97224e-05 8.9411e-06 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 45978327 
## 
## solution.v:
##  0.01845221 2.91166e-05 0.07118115 0.1280638 1.97e-08 0.4723398 0.03435811 0.03754157 9.31e-08 0.04922084 0.0001052653 0.1887081 
## 
## solution.w:
##  1.67e-07 3.064e-07 9.18e-08 3.608e-07 1.193e-07 0.2864712 3.058e-07 4.09e-08 2.273e-07 4.65e-08 4.8899e-06 7.946e-07 1.415e-07 2.682e-07 0.4873732 2.344e-07 9.76e-08 4.391e-07 1.05e-08 1.311e-07 5.8358e-06 1.518e-07 3.18328e-05 2.75509e-05 8.487e-07 0.06460972 0.1614447 1.429e-07 6.98e-08 5.92e-08 4.694e-07 2.206e-07 1.672e-07 1.665e-07 5.41e-08 7.28e-08 7.68e-08 6.22e-08 1.616e-07 2.45647e-05 3.6e-09 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 41590667 
## 
## solution.v:
##  0.2455889 0.00209698 0.1757948 0.1702656 0.08381018 0.01414822 0.02951903 0.01393717 0.002456642 0.00289338 0.02374582 0.2357432 
## 
## solution.w:
##  1.195e-07 2.548e-07 0.6702648 1.745e-07 5.91e-08 3.6e-09 2.125e-07 9.9e-09 6.27e-08 0.008614123 2.88e-08 1.044e-07 1.503e-07 6.23e-08 2.77e-08 1.1418e-06 1.032e-07 2.62e-08 3.69e-08 9.92e-08 2.5e-09 8.97e-08 8.043e-07 3.97e-08 0.04019482 2.56e-08 1.00678e-05 4.21e-07 6.35e-08 2.145e-07 9.34e-08 2.238e-07 2.89e-08 5.84e-08 3.79e-08 4.31e-08 2.454e-07 8.34e-08 7.242e-07 2.56e-08 0.2809103 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 706602.5 
## 
## solution.v:
##  0.05373426 0.07676175 0.04688638 1.6845e-06 0.2467312 0.003807129 0.04595644 0.1086823 0.0009843463 0.0006882806 0.005180433 0.4105858 
## 
## solution.w:
##  0.1190882 2.96314e-05 1.50606e-05 4.59062e-05 8.637e-06 1.29891e-05 0.2218745 1.719e-07 2.11169e-05 0.003050136 1.5366e-05 1.85656e-05 0.0001434978 3.08208e-05 1.00182e-05 0.001980664 6.25927e-05 1.34985e-05 0.120207 1.95958e-05 1.7516e-06 0.001013374 0.1644915 8.29e-08 0.0006110355 1.73645e-05 2.3393e-05 0.002366146 2.68964e-05 1.84814e-05 2.93974e-05 3.92539e-05 1.97192e-05 0.0001007274 5.4892e-06 1.12115e-05 6.28707e-05 1.32447e-05 8.32426e-05 0.3644161 7.52e-07 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 18414497 
## 
## solution.v:
##  0.002870373 0.005006917 0.01604277 7.422e-07 0.03514727 0.0002858033 0.1713652 0.3277229 0.2088935 0.03674979 0.04165262 0.1542621 
## 
## solution.w:
##  3.5953e-06 4.45014e-05 2.184e-07 6.97e-08 1.959e-07 1.495e-07 4.69479e-05 3.538e-07 1.574e-07 7.007e-07 7.19e-07 1.8846e-06 8.766e-07 1.475e-07 4.6e-08 1.1849e-06 5.508e-07 6.17e-07 0 4.943e-07 6.1439e-06 1.6992e-06 7.464e-07 8.003e-07 8.903e-07 7.916e-07 6.61e-08 1.9309e-06 3.592e-07 3.897e-07 7.25e-08 3.1e-08 5.667e-07 3.123e-07 1.903e-07 2.285e-07 5.859e-07 2.102e-07 3.295e-07 0.9494409 0.05043938 
## 
## 
## X1, X0, Z1, Z0 all come directly from dataprep object.
## 
## 
## **************** 
##  searching for synthetic control unit  
##  
## 
## **************** 
## **************** 
## **************** 
## 
## MSPE (LOSS V): 54209827 
## 
## solution.v:
##  1.61635e-05 0.00036204 0.0002258316 0.02031484 1.2883e-06 0.0004422592 0.02234057 0.09288485 1.21312e-05 0.1582984 1.49859e-05 0.7050866 
## 
## solution.w:
##  2.8e-08 3.06e-08 8.4e-08 2.95e-08 3.65e-08 0.8575707 1.5e-08 2.8698e-06 1.78e-08 1.16e-08 1.63e-08 2.91e-08 2.26e-08 2.2e-08 3.22e-08 2.93e-08 1.59e-08 2.29e-08 5.64e-08 4.11e-08 1.26e-08 1.12e-08 4.59e-08 2.96e-08 1.323e-07 0.142424 2.56e-08 1.96e-08 1.58e-08 1.818e-07 2.03e-08 2.35e-08 3.97e-08 1.12e-08 1.65e-08 2.26e-08 2.11e-08 1.0156e-06 1.142e-07 2.21e-08 2.59e-08
## New names:
## • `w.weight` -> `w.weight...1`
## • `w.weight` -> `w.weight...2`
## • `w.weight` -> `w.weight...3`
## • `w.weight` -> `w.weight...4`
## • `w.weight` -> `w.weight...5`
## • `w.weight` -> `w.weight...6`
## • `w.weight` -> `w.weight...7`
## • `w.weight` -> `w.weight...8`
## • `w.weight` -> `w.weight...9`
## • `w.weight` -> `w.weight...10`
## • `w.weight` -> `w.weight...11`
## • `w.weight` -> `w.weight...12`
## • `w.weight` -> `w.weight...13`
## • `w.weight` -> `w.weight...14`
## • `w.weight` -> `w.weight...15`
## • `w.weight` -> `w.weight...16`
## • `w.weight` -> `w.weight...17`
## • `w.weight` -> `w.weight...18`
## • `w.weight` -> `w.weight...19`
## • `w.weight` -> `w.weight...20`
## • `w.weight` -> `w.weight...21`
## • `w.weight` -> `w.weight...22`
## • `w.weight` -> `w.weight...23`
## • `w.weight` -> `w.weight...24`
## • `w.weight` -> `w.weight...25`
## • `w.weight` -> `w.weight...26`
## • `w.weight` -> `w.weight...27`
## • `w.weight` -> `w.weight...28`
## • `w.weight` -> `w.weight...29`
## • `w.weight` -> `w.weight...30`
## • `w.weight` -> `w.weight...31`
## • `w.weight` -> `w.weight...32`
## • `w.weight` -> `w.weight...33`
## • `w.weight` -> `w.weight...34`
## • `w.weight` -> `w.weight...35`
## • `w.weight` -> `w.weight...36`
## • `w.weight` -> `w.weight...37`
## • `w.weight` -> `w.weight...38`
## • `w.weight` -> `w.weight...39`
## • `w.weight` -> `w.weight...40`
## • `w.weight` -> `w.weight...41`
## • `w.weight` -> `w.weight...42`
mspe_test_loout <- mspe.test(placebos_loout, discard.extreme = FALSE)

mspe_test_loout$p.val
## [1] 0.09302326

Generate LOO Test Gaps PLot

Create Dataframe with LOO & Primary Synthetic Model Results

loo_gap_ca <- real_AZ_median_contributions - synth_AZ_median_contributions_looca
loo_gap_hi <- real_AZ_median_contributions - synth_AZ_median_contributions_loohi
loo_gap_id <- real_AZ_median_contributions - synth_AZ_median_contributions_looid
loo_gap_nv <- real_AZ_median_contributions - synth_AZ_median_contributions_loonv
loo_gap_sc <- real_AZ_median_contributions - synth_AZ_median_contributions_loosc
loo_gap_ut <- real_AZ_median_contributions - synth_AZ_median_contributions_loout
df_gaps_plot_loo <- data.frame(
  year = rep(years, 1 + 6),  # 1 main + 6 LOO
  gap = c(
    synthAZ_gaps,
    loo_gap_ca,
    loo_gap_hi,
    loo_gap_id,
    loo_gap_nv,
    loo_gap_sc,
    loo_gap_ut
  ),
  group = rep(c("Gap Between Real & Synthetic Arizona", 
                "Gap Between Real & Synthetic Arizona (LOO)"), 
              times = c(length(years), length(years) * 6))
)

df_gaps_plot_loo$line_id <- with(df_gaps_plot_loo, paste0(group, "_", rep(1:7, each = length(years))))

LOO Test Gaps Plot

synth_control_gapsplot_AZ_loo <- ggplot(df_gaps_plot_loo, aes(x = year, y = gap, group = line_id,
                             color = group, linetype = group)) +
  geom_line(size = 1, alpha = 0.7) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_vline(xintercept = 2018.5, linetype = "dotted") +

  annotate("text",
           x = 2017.75, y = -60000,
           label = "Adoption of the\nUniversal Charitable Deduction",
           hjust = 1, size = 3,
           family = "Times New Roman",
           lineheight = 0.8) +
  annotate("segment",
           x = 2017.8, xend = 2018.4,
           y = -60000,
           yend = -60000,
           arrow = arrow(length = unit(0.15, "inches")),
           color = "black") +

  scale_y_continuous(labels = label_dollar(scale = 1e-3, suffix = "K")) +
  coord_cartesian(ylim = c(-100000, 100000)) +
  scale_x_continuous(breaks = years) +

  scale_color_manual(
    values = c(
      "Gap Between Real & Synthetic Arizona" = "black",
      "Gap Between Real & Synthetic Arizona (LOO)" = "grey50"
    ),
    name = NULL
  ) +
  scale_linetype_manual(
    values = c(
      "Gap Between Real & Synthetic Arizona" = "dashed",
      "Gap Between Real & Synthetic Arizona (LOO)" = "dashed"
    ),
    name = NULL
  ) +

  labs(
    x = "\nYear\n",
    y = "\nGap in Median Contributions\n",
    caption = str_wrap("Note: p-values for the LOO tests range from approximately 0.070 to 0.186 when including all placebo states (other than those left out) in the p-value calculation and from approximately 0.086 to 0.216 when discarding all placebo states with a pre-treatment MSPE 2 times higher than Arizona's. The LOO tests for Nevada and Utah relied on the average of the 2013 - 2018 outcome lags, rather than the individual outcome lags for 2013 - 2016, as predictors in the model due to issues of multicollinearity in the predictors.")
  ) +

  theme_classic(base_family = "Times New Roman") +
  theme(
    panel.border = element_rect(color = "black", fill = NA, size = 0.8),
    
    legend.position = c(0.95, 0.05),
    legend.justification = c("right", "bottom"),
    legend.background = element_rect(color = "black", fill = "white", size = 0.25),
    legend.text = element_text(size = 5),
    axis.title.y = element_text(size = 10),
    plot.margin = unit(c(1,3,1,0), "lines"),
    plot.caption = element_text(hjust = 0),
    legend.key.height = unit(0.3, "cm"),     # shrink height of each legend key
    legend.spacing.y = unit(0.1, "cm"))

synth_control_gapsplot_AZ_loo

ggsave(
  filename = "LOO_SynthControlGapsPlot_AZUnivCharitableDeductionAnalysis.png",
  plot = synth_control_gapsplot_AZ_loo,  # or replace with your plot object if it's named
  path = "/Users/corbinwalls/Library/CloudStorage/OneDrive-american.edu/Projects/Charitable Calculations/Data & Analysis/Analysis/",  # replace with your actual folder path
  width = 6.5,
  height = 4.5,
  units = "in",
  dpi = 300  # optional: high-resolution output
)