33"""
44 load_brexit()
55
6- Returns a `DataFrame` with quarterly GDP data on 30 OECD countries, borrowed from the
7- analysis of the effect of Brexit on UK GDP undertaken by the [Centre for European Reform](
6+ Returns a `DataFrame` with quarterly GDP data on 30 OECD countries, borrowed from the analysis of
7+ the effect of Brexit on UK GDP undertaken by the [Centre for European Reform](
88https://www.cer.eu/insights/cost-brexit-june-2019)
99
10- The `TreatmentPanel` for Brexit should be specified as
11- ```
12- TreatmentPanel("United Kingdom" => Date(2016, 7, 1), df;
13- outcome = :realgdp, id_var = :country, t_var = :quarter)
14- ```
10+ With the Brexit referendum having taken place on 23 June 2016, the `TreatmentPanel` for Brexit
11+ should be specified as
12+ ```
13+ TreatmentPanel(df, "United Kingdom" => Date(2016, 7, 1);
14+ outcome = :realgdp, id_var = :country, t_var = :quarter)
15+ ```
1516"""
1617function load_brexit ()
1718 CSV. read (joinpath (dirname (@__FILE__ )," .." ," data" ," brexit.csv" ), DataFrame; stringtype = String)
1819end
1920
21+ """
22+ load_brexit_panel()
23+
24+ Returns a `BalancedPanel` object based on the data set available through load_brexit(), with
25+ treatment assignment specified as `"United Kingdom" => Date(2016, 7, 1)`
26+
27+ """
2028function load_brexit_panel ()
2129 df_brexit = load_brexit ()
2230 BalancedPanel (df_brexit, " United Kingdom" => Date (2016 , 7 , 1 );
2331 id_var = :country , t_var = :quarter , outcome_var = :realgdp )
2432end
2533
34+
35+ """
36+ load_germany()
37+
38+ Returns a `DataFrame` with annual observations of per-capita GDP and covariates between 1960 and
39+ 2003. The data is used in Abadie, Diamond and Hainmueller (2015) to study the effect of German
40+ unification on per-capita GDP.
41+
42+ As German reunification occurred in 1990, the `TreatmentPanel` for use in synthetic control
43+ estimation should be specified as:
44+
45+ ```
46+ TreatmentPanel(df, "West Germany" => 1990,
47+ id_var = "country", t_var = "year", outcome_var = "gdp")
48+ ```
49+ """
2650function load_germany ()
2751 CSV. read (joinpath (dirname (@__FILE__ )," .." ," data" ," germany.csv" ), DataFrame; stringtype = String)
2852end
2953
54+ """
55+ load_germany_panel()
56+
57+ Returns a `BalancedPanel` object based on the data available from `load_germany()`, with
58+ treatment assignment specified as `"West Germany" => 1990`
59+ """
3060function load_germany_panel ()
3161 df_germany = load_germany ()
3262 BalancedPanel (df_germany, " West Germany" => 1990 ;
3363 id_var = " country" , t_var = " year" , outcome_var = " gdp" )
3464end
3565
66+ """
67+ load_basque()
68+
69+ Returns a `DataFrame` with annual observations of per-capita GDP and covariates between 1955 and
70+ 1997. The data is used in Abadie and Gardeazabal (2003) to study the effect of ETA terrorism
71+ on per-capita GDP in the Basque country.
72+
73+ To undertake analysis simliar to that in Abadie and Gardeazabal (2003), the `TreatmentPanel` for
74+ use in synthetic control estimation should be specified as:
75+
76+ ```
77+ TreatmentPanel(df, "Basque Country (Pais Vasco)" => 1970,
78+ id_var = "regionname", t_var = "year", outcome_var = "gdpcap")
79+ ```
80+ """
3681function load_basque ()
3782 CSV. read (joinpath (dirname (@__FILE__ )," .." ," data" ," basque.csv" ), DataFrame;
3883 stringtype = String, missingstring = " NA" )
3984end
4085
86+ """
87+ load_basque_panel()
88+
89+ Returns a `BalancedPanel` object based on the data available from `load_basque()`, with
90+ treatment assignment specified as `"Basque Country (Pais Vasco)" => 1970`
91+ """
4192function load_basque_panel ()
4293 df_basque = load_basque ()
4394 BalancedPanel (df_basque, " Basque Country (Pais Vasco)" => 1970 ;
4495 id_var = " regionname" , t_var = " year" , outcome_var = " gdpcap" )
4596end
4697
98+ """
99+ load_smoking()
100+
101+ Returns a `DataFrame` with annual observations of cigarette sales and covariates for 39 US
102+ states between 1970 and 2000. The data is used in Abadie, Diamond and Hainmueller (2010) to
103+ study the effect of Proposition 99 on cigarette sales in California
104+
105+ To undertake analysis simliar to that in Abadie, Diamond and Hainmueller (2010), the
106+ `TreatmentPanel` for use in synthetic control estimation should be specified as:
107+
108+ ```
109+ TreatmentPanel(df, 3 => 1989,
110+ id_var = "state", t_var = "year", outcome_var = "cigsale")
111+ ```
112+ """
47113function load_smoking ()
48- CSV. read (joinpath (dirname (@__FILE__ )," .." ," data" ," smoking.csv" ), DataFrame;
114+ df_smoking = CSV. read (joinpath (dirname (@__FILE__ )," .." ," data" ," smoking.csv" ), DataFrame;
49115 stringtype = String, missingstring = " NA" )
116+ select! (df_smoking, Not (:Column1 ))
50117end
118+
119+ """
120+ load_smoking_panel()
121+
122+ Returns a `BalancedPanel` object based on the data available from `load_smoking()`, with
123+ treatment assignment specified as `3 => 1989`
124+ """
125+ function load_smoking_panel ()
126+ df_smoking = load_smoking ()
127+ BalancedPanel (df_smoking, 3 => 1989 ;
128+ id_var = :state , t_var = :year , outcome_var = :cigsale )
129+ end
0 commit comments