修訂 | 8700cfef6c536d9547f22acdb240dfa902c7bc9f (tree) |
---|---|
時間 | 2020-02-06 22:37:10 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
A tex file showing how to use the bibtex file for bibliography and how to put the bibliography at the end and ensure that any picture is placed in its section.
@@ -0,0 +1,367 @@ | ||
1 | + \documentclass[12pt,a4paper]{article} | |
2 | +% \documentclass[14pt, a4paper]{extarticle} | |
3 | +\usepackage[utf8x]{inputenc} | |
4 | +\usepackage[english]{babel} | |
5 | +\usepackage{graphicx} | |
6 | +\usepackage{amsmath} | |
7 | +\usepackage{xcolor} | |
8 | +\usepackage{caption} | |
9 | +\usepackage{url} | |
10 | +\usepackage{esvect} | |
11 | +% for placeholder text | |
12 | +\usepackage{lipsum} | |
13 | + % \usepackage[margin=0.5in]{geometry} | |
14 | +\usepackage{mathtools}% Loads amsmath | |
15 | + \usepackage[section]{placeins} | |
16 | + \usepackage{tabularx} | |
17 | +\usepackage{colortbl, xcolor} | |
18 | +\usepackage{booktabs} | |
19 | +\usepackage{doi} | |
20 | + | |
21 | +% \usepackage[backend=bibtex,style=verbose-trad2]{biblatex} | |
22 | +% \bibliography{mybibfile} | |
23 | + | |
24 | + | |
25 | +\title{Annex I: Methodology for Composite Indicator on Non-Tariff Measures} | |
26 | +% \author{Lorenzo Isella} | |
27 | +\date{} | |
28 | + | |
29 | +\begin{document} | |
30 | +\maketitle | |
31 | + | |
32 | +\abstract{ | |
33 | +We detail the methodology and the calculations behind the construction | |
34 | +of a composite indicator for the non-tariff measures based on the | |
35 | +UNCTAD data available at | |
36 | +\url{https://trains.unctad.org/Forms/Analysis.aspx}. We follow the | |
37 | +methodology in \cite{nicoletti} and \cite{oecd-composite}. | |
38 | +} | |
39 | +\section{Data Overview} | |
40 | +The discussion of the economic meaning of the various non-tariff | |
41 | +measures (NTMs) is beyond the scope of this document, as is the data | |
42 | +processing of the UNCTAD database. | |
43 | +The starting point is given by the already cleaned, aggregated and restructured NTM | |
44 | +dataset (a raw dowload of the database will not directly provide the | |
45 | +same input data as the one used for this manuscript). | |
46 | +For all the $85$ reporters listed in the database we calculated the | |
47 | +total number of NTMs they impose on third-country imports broken down | |
48 | +by ntm 1-digit code. | |
49 | + | |
50 | +The UNCTAD database contains information about the following | |
51 | +NTM 1-digit codes | |
52 | +\begin{itemize} | |
53 | +\item A SANITARY AND PHYTOSANITARY MEASURES | |
54 | +\item B TECHNICAL BARRIERS TO TRADE | |
55 | +\item C PRE-SHIPMENT INSPECTION AND OTHER | |
56 | +FORMALITIES | |
57 | +\item D CONTINGENT TRADE-PROTECTIVE MEASURES | |
58 | +\item E NON-AUTOMATIC LICENSING, QUOTAS, | |
59 | +PROHIBITIONS AND QUANTITY-CONTROL | |
60 | +MEASURES OTHER THAN FOR SPS OR TBT | |
61 | +REASONS | |
62 | +\item F PRICE-CONTROL MEASURES, INCLUDING | |
63 | +ADDITIONAL TAXES AND CHARGES | |
64 | +\item G FINANCE MEASURES | |
65 | +\item H MEASURES AFFECTING COMPETITION | |
66 | +\item I TRADE-RELATED INVESTMENT MEASURES | |
67 | +\item J DISTRIBUTION RESTRICTIONS | |
68 | +\item K RESTRICTIONS ON POST-SALES SERVICES | |
69 | + \item {L SUBSIDIES (EXCLUDING EXPORT SUBSIDIES UNDER P7)} | |
70 | +\item M GOVERNMENT PROCUREMENT RESTRICTIONS | |
71 | +\item N INTELLECTUAL PROPERTY | |
72 | +\item O RULES OF ORIGIN | |
73 | +\item {P EXPORT-RELATED MEASURES} | |
74 | +\end{itemize} | |
75 | + | |
76 | +We leave out of the analysis P and L, since they are measures taken by | |
77 | +the exporting rather than the importing country (in other words, they | |
78 | +affect the imports, but they are not the consequence of some policy of | |
79 | +the importing country). | |
80 | +\section{Correlation Analysis} | |
81 | +We calculate the total number of NTMs, broken by | |
82 | +1-digit codes, that each reporter (a set of 85 countries or country aggregates | |
83 | +including the EU28) adopts (sum of its NTMs on all the imports | |
84 | +from any third country). | |
85 | + | |
86 | +We then look at the structure of the correlations which are illustrated | |
87 | +in Figure \ref{cor-mat}. A screening of the correlation matrix reveals | |
88 | +several interesting properties | |
89 | +\begin{enumerate} | |
90 | +\item All the statistically significant correlations are positive. | |
91 | +\item Subindicators H and I are not significantly correlated to any other | |
92 | + subindicator. We therefore choose to leave them out of the analysis. | |
93 | + % \textcolor{red}{Is this a sound decision (statistically | |
94 | + % speaking)? Economically speaking it may make sense since I | |
95 | + % includes also measures affecting the producer and not only the | |
96 | + % importer and the same applies to H.} | |
97 | +\item There is an extremely high correlation between subindicators N and | |
98 | + O. This is a spurious correlation due to both O and N consisting | |
99 | + primarily of zero values. As a consequence, they are also left out. | |
100 | +\end{enumerate} | |
101 | + | |
102 | +% \textcolor{red}{Discarding subindicators H, I, N and O is also the direct result of | |
103 | +% eliminating all the subindicators for which the non-zero values are less | |
104 | +% than $10\%$ than the total number of data.} If we believe in the | |
105 | +% integrity of the database (which does not explicitly mention missing | |
106 | +% data), the absence of information about a e.g. rules of origins | |
107 | +% (subindicator O) | |
108 | +% measures imposed by country A from country B should mean that the | |
109 | +% number of measures related to the rules of origins is zero and not | |
110 | +% missing. Several conversation with UNCTAD however leave ample space to doubt. | |
111 | + | |
112 | + | |
113 | +% % \end{itemize} | |
114 | + | |
115 | +% We also notice the extremely high correlation between N and O. | |
116 | +% We do not have an explanation for that, since rules of origin and | |
117 | +% intellectual property are definitely two distinct categories of | |
118 | +% measures, but the level of correlation is such that we choose to | |
119 | +% discard indicator N. | |
120 | +% \begin{itemize} | |
121 | +% \item \textcolor{red}{Once again, any comments on this?} | |
122 | +% \end{itemize} | |
123 | + | |
124 | +\begin{figure} | |
125 | +\includegraphics[width=\columnwidth]{correlation_subindicators.pdf} | |
126 | +\caption{Correlation matrix. Crossed values are not statistically | |
127 | + significant at the $p=0.05$ level.} | |
128 | +\label{cor-mat} | |
129 | +\end{figure} | |
130 | + | |
131 | +\subsection{Outliers} | |
132 | + | |
133 | +The remaining indicators are all affected by outliers, as one can see | |
134 | +in Figure \ref{outliers}. We are very reluctant to treat them, despite | |
135 | +the impact they may have on the PCA, because they are not supposed to | |
136 | +be measurement errors, but they stand for countries imposing an | |
137 | +unusually high number of NTMs on their imports. | |
138 | + | |
139 | +% \textcolor{red}{Any thoughts on this?} | |
140 | + | |
141 | + | |
142 | + | |
143 | + | |
144 | + | |
145 | +\begin{figure} | |
146 | +\includegraphics[width=\columnwidth]{indicators_box_plot2.pdf} | |
147 | +\caption{Boxplots of the NTM 1-digit distributions.} | |
148 | +\label{outliers} | |
149 | +\end{figure} | |
150 | + | |
151 | + | |
152 | +\section{Principal Component Analysis} | |
153 | +In this section we resort to principal component analysis (PCA) to | |
154 | +statistically determine the weights of the components of the NTM composite | |
155 | +indicator we intend to construct. In the following, unless otherwise stated, we will use the | |
156 | +terms component and factor interchangeably. | |
157 | +The methodology is taken from \cite{nicoletti} and \cite{oecd-composite}. | |
158 | + | |
159 | +First, we carry out a PCA on the centred and scaled subindicators and we | |
160 | +determine the number of factors we want to include in the analysis. | |
161 | +According to Table \ref{table-pca} the first three components satisfy | |
162 | +the following conditions (laid out in Ref. \cite{nicoletti}). | |
163 | +\begin{itemize} | |
164 | +\item The associated eigenvalue is larger than $1$. | |
165 | +\item Each component accounts for at least $10\%$ of the total | |
166 | + variance. | |
167 | +\item Together, they account for more than $60\%$ of the total variance. | |
168 | +\end{itemize} | |
169 | + | |
170 | + | |
171 | +% latex table generated in R 3.6.1 by xtable 1.8-4 package | |
172 | +% Tue Nov 26 09:51:34 2019 | |
173 | +\begin{table}[ht] | |
174 | +\centering | |
175 | +\caption{Summary statistics of PCA (without rotation).} | |
176 | +\begin{tabular}{rrr} | |
177 | + \toprule | |
178 | +Eigenvalue & Share of total variance & Cumulative share of variance \\ | |
179 | + \midrule | |
180 | +\bf{2.53} & \bf{0.32} & \bf{0.32} \\ | |
181 | + \rowcolor[gray]{0.9}\bf{1.49} & \bf{0.19} & \bf{0.50} \\ | |
182 | + \bf{1.11} & \bf{0.14} & \bf{0.64} \\ | |
183 | + \rowcolor[gray]{0.9}0.91 & 0.11 & 0.75 \\ | |
184 | + 0.80 & 0.10 & 0.85 \\ | |
185 | + \rowcolor[gray]{0.9}0.66 & 0.08 & 0.94 \\ | |
186 | + 0.32 & 0.04 & 0.98 \\ | |
187 | + \rowcolor[gray]{0.9}0.18 & 0.02 & 1.00 \\ | |
188 | + \bottomrule | |
189 | +\end{tabular} | |
190 | +\label{table-pca} | |
191 | +\end{table} | |
192 | + | |
193 | + | |
194 | +The second step consists in performing a PCA followed by a varimax | |
195 | +rotation by limiting the number of factors to three. | |
196 | +The loadings of the rotated components are provided in Table \ref{table-varimax}. | |
197 | + | |
198 | +% latex table generated in R 3.6.1 by xtable 1.8-4 package | |
199 | +% Tue Nov 26 10:29:58 2019 | |
200 | +\begin{table}[ht] | |
201 | +\centering | |
202 | +\caption{Loadings of the rotated components (varimax rotation).} | |
203 | +\begin{tabular}{lrrr} | |
204 | + \toprule | |
205 | +Subindicator & Component 1 & Component 2 & Component 3 \\ | |
206 | + \midrule | |
207 | +A & 0.82 & 0.39 & 0.09 \\ | |
208 | + \rowcolor[gray]{0.9}B & 0.70 & 0.37 & -0.03 \\ | |
209 | + C & 0.38 & 0.38 & -0.10 \\ | |
210 | + \rowcolor[gray]{0.9}D & -0.05 & 0.88 & -0.04 \\ | |
211 | + E & 0.03 & 0.71 & 0.54 \\ | |
212 | + \rowcolor[gray]{0.9}F & 0.62 & -0.23 & 0.13 \\ | |
213 | + G & 0.08 & -0.02 & 0.95 \\ | |
214 | + \rowcolor[gray]{0.9}H & 0.63 & -0.13 & 0.03 \\ | |
215 | + \bottomrule | |
216 | +\end{tabular} | |
217 | +\label{table-varimax} | |
218 | +\end{table} | |
219 | + | |
220 | +At this point, we follow the procedure by \cite{nicoletti}. First, we | |
221 | +calculate the normalised squared factor loadings, which are reported | |
222 | +in Table \ref{squared-loadings}. | |
223 | +We then do the following | |
224 | +\begin{enumerate} | |
225 | +\item we select the subindicators with the highest factors loadings in | |
226 | +intermediate composite indicators. They are highlighted in Table | |
227 | +\ref{squared-loadings}; | |
228 | +\item we then weight each composite using the proportion of the | |
229 | + variance explained in the data set. In order to do so we calculate | |
230 | + the sum of the unnormalised squared factor loadings (explained | |
231 | + variance) and we divide it by the total variance accounted for by | |
232 | + the rotated factors (sum of the highlighted eigenvalues in Table \ref{table-pca}). | |
233 | +\end{enumerate} | |
234 | + | |
235 | +Combining the results in Tables | |
236 | +\ref{squared-loadings}-\ref{squared-loadings2}, we get the | |
237 | +weights for the subindicators illustrated in Table | |
238 | +\ref{final-weights}. | |
239 | +Finally, although this has no impact on the ranking of the countries, | |
240 | +we normalise to one the sum of the weights of the indicators, as shown | |
241 | +in Table \ref{final-weights-norm}. | |
242 | + | |
243 | + | |
244 | + | |
245 | + | |
246 | + | |
247 | +% latex table generated in R 3.6.1 by xtable 1.8-4 package | |
248 | +% Tue Nov 26 10:49:08 2019 | |
249 | +\begin{table}[ht] | |
250 | +\centering | |
251 | +\caption{Normalised squared loadings of the rotated components in | |
252 | + Table \ref{table-varimax}.} | |
253 | +\begin{tabular}{lrrr} | |
254 | + \toprule | |
255 | +Subindicator & Component 1 & Component 2 & Component 3 \\ | |
256 | + \midrule | |
257 | +A & \bf{0.32} & 0.08 & 0.01 \\ | |
258 | + \rowcolor[gray]{0.9}B & \bf{0.23} & 0.08 & 0.00 \\ | |
259 | + C & 0.07 & \bf{0.08} & 0.01 \\ | |
260 | + \rowcolor[gray]{0.9}D & 0.00 & \bf{0.43} & 0.00 \\ | |
261 | + E & 0.00 & \bf{0.29} & 0.24 \\ | |
262 | + \rowcolor[gray]{0.9}F & \bf{0.18} & 0.03 & 0.01 \\ | |
263 | + G & 0.00 & 0.00 & \bf{0.73} \\ | |
264 | + \rowcolor[gray]{0.9}H & \bf{0.19} & 0.01 & 0.00 \\ | |
265 | + \bottomrule | |
266 | +\end{tabular} | |
267 | +\label{squared-loadings} | |
268 | +\end{table} | |
269 | + | |
270 | + | |
271 | + | |
272 | +% latex table generated in R 3.6.1 by xtable 1.8-4 package | |
273 | +% Tue Nov 26 12:47:14 2019 | |
274 | +\begin{table}[ht] | |
275 | +\centering | |
276 | +\caption{Squared loadings of the rotated components in | |
277 | + Table \ref{table-varimax}.} | |
278 | +\begin{tabular}{lrrr} | |
279 | + \toprule | |
280 | +Subindicator & Component 1 & Component 2 & Component 3 \\ | |
281 | + \midrule | |
282 | +A & 0.68 & 0.15 & 0.01 \\ | |
283 | + \rowcolor[gray]{0.9}B & 0.49 & 0.14 & 0.00 \\ | |
284 | + C & 0.15 & 0.14 & 0.01 \\ | |
285 | + \rowcolor[gray]{0.9}D & 0.00 & 0.77 & 0.00 \\ | |
286 | + E & 0.00 & 0.51 & 0.30 \\ | |
287 | + \rowcolor[gray]{0.9}F & 0.39 & 0.05 & 0.02 \\ | |
288 | + G & 0.01 & 0.00 & 0.90 \\ | |
289 | + \rowcolor[gray]{0.9}H & 0.40 & 0.02 & 0.00 \\ | |
290 | + \midrule | |
291 | + Explained Variance & 2.11 & 1.78 & 1.23 \\ | |
292 | + Explained/Total Variance & \bf{0.41} & \bf{0.35} & \bf{0.24} \\ | |
293 | + \bottomrule | |
294 | +\end{tabular} | |
295 | +\label{squared-loadings2} | |
296 | +\end{table} | |
297 | + | |
298 | + | |
299 | +% latex table generated in R 3.6.1 by xtable 1.8-4 package | |
300 | +% Tue Nov 26 14:41:44 2019 | |
301 | +\begin{table}[ht] | |
302 | +\centering | |
303 | +\caption{Final weights for the subindicators.} | |
304 | +\begin{tabular}{lr} | |
305 | + \toprule | |
306 | +Subindicator & Weight \\ | |
307 | + \midrule | |
308 | +A & 0.13 \\ | |
309 | + \rowcolor[gray]{0.9}B & 0.10 \\ | |
310 | + C & 0.03 \\ | |
311 | + \rowcolor[gray]{0.9}D & 0.15 \\ | |
312 | + E & 0.10 \\ | |
313 | + \rowcolor[gray]{0.9}F & 0.08 \\ | |
314 | + G & 0.17 \\ | |
315 | + \rowcolor[gray]{0.9}H & 0.08 \\ | |
316 | + \bottomrule | |
317 | +\end{tabular} | |
318 | +\label{final-weights} | |
319 | +\end{table} | |
320 | + | |
321 | + | |
322 | + | |
323 | +% latex table generated in R 3.6.2 by xtable 1.8-4 package | |
324 | +% Thu Feb 6 11:57:53 2020 | |
325 | +\begin{table}[ht] | |
326 | +\centering | |
327 | +\caption{Final weights for the subindicators after normalisation.} | |
328 | +\begin{tabular}{lr} | |
329 | + \toprule | |
330 | +Subindicator & Weight \\ | |
331 | + \midrule | |
332 | +A & 0.16 \\ | |
333 | + \rowcolor[gray]{0.9}B & 0.12 \\ | |
334 | + C & 0.03 \\ | |
335 | + \rowcolor[gray]{0.9}D & 0.18 \\ | |
336 | + E & 0.12 \\ | |
337 | + \rowcolor[gray]{0.9}F & 0.09 \\ | |
338 | + G & 0.21 \\ | |
339 | + \rowcolor[gray]{0.9}H & 0.09 \\ | |
340 | + \bottomrule | |
341 | +\end{tabular} | |
342 | +\label{final-weights-norm} | |
343 | +\end{table} | |
344 | + | |
345 | + | |
346 | + | |
347 | + | |
348 | +% \section{Final Questions} | |
349 | +% Any feedback on the methodology (misunderstandings on our side; | |
350 | +% possible refinements, improved choice of the number of components, etc...) is more than welcome. | |
351 | +% If needed, we can provide more information (including the input data | |
352 | +% and the R code for the PCA calculations). | |
353 | + | |
354 | +% We have a question about Table 6.2 in \cite{oecd-composite}, page | |
355 | +% 57: what is the normalisation of ``Expl./Tot'' (last line in the table)? | |
356 | +% We thought it should be normalised to $1$, like the ``Weight of | |
357 | +% factors in summary indicator'' in Tables 8,9 and 11 of | |
358 | +% \cite{nicoletti}. | |
359 | + | |
360 | + | |
361 | +\clearpage | |
362 | + | |
363 | +\bibliography{mybibfile} | |
364 | +\bibliographystyle{apalike} | |
365 | + | |
366 | + | |
367 | +\end{document} | |
\ No newline at end of file |