• R/O
  • SSH

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. 8700cfef6c536d9547f22acdb240dfa902c7bc9f
Tamaño 12,396 octetos
Tiempo 2020-02-06 22:37:10
Autor Lorenzo Isella
Log Message

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.

Content

 \documentclass[12pt,a4paper]{article}
% \documentclass[14pt, a4paper]{extarticle}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}  
\usepackage{xcolor}
\usepackage{caption}  
\usepackage{url}
\usepackage{esvect}
% for placeholder text
\usepackage{lipsum}
 % \usepackage[margin=0.5in]{geometry}
\usepackage{mathtools}% Loads amsmath
   \usepackage[section]{placeins}
 \usepackage{tabularx}
\usepackage{colortbl, xcolor}
\usepackage{booktabs}
\usepackage{doi}

% \usepackage[backend=bibtex,style=verbose-trad2]{biblatex}
% \bibliography{mybibfile} 


\title{Annex I: Methodology for Composite Indicator on Non-Tariff Measures}
%  \author{Lorenzo Isella}
\date{}

\begin{document}
\maketitle
  
\abstract{
We detail the methodology and the calculations behind the construction
of a composite indicator for the non-tariff measures based on the
UNCTAD data available at
\url{https://trains.unctad.org/Forms/Analysis.aspx}. We follow the
methodology in \cite{nicoletti} and \cite{oecd-composite}.
}
\section{Data Overview}
The discussion of the economic meaning of the various non-tariff
measures (NTMs) is beyond the scope of this document, as is the data
processing of the UNCTAD database.
The starting point is given by the already cleaned, aggregated and restructured NTM
dataset (a raw dowload of the database will not directly provide the
same input data as the one used for this manuscript).
For all the $85$ reporters listed in the database we calculated the
total number of NTMs they impose on third-country imports broken  down
by ntm 1-digit code.

The UNCTAD database contains information about the following
NTM 1-digit codes
\begin{itemize}
\item A SANITARY AND PHYTOSANITARY MEASURES
\item B TECHNICAL BARRIERS TO TRADE
\item C PRE-SHIPMENT INSPECTION AND OTHER
FORMALITIES
\item D CONTINGENT TRADE-PROTECTIVE MEASURES
\item E NON-AUTOMATIC LICENSING, QUOTAS,
PROHIBITIONS AND QUANTITY-CONTROL
MEASURES OTHER THAN FOR SPS OR TBT
REASONS
\item F PRICE-CONTROL MEASURES, INCLUDING
ADDITIONAL TAXES AND CHARGES
\item G FINANCE MEASURES
\item H MEASURES AFFECTING COMPETITION
\item I TRADE-RELATED INVESTMENT MEASURES
\item J DISTRIBUTION RESTRICTIONS
\item K RESTRICTIONS ON POST-SALES SERVICES
 \item {L SUBSIDIES (EXCLUDING EXPORT SUBSIDIES UNDER P7)}
\item M GOVERNMENT PROCUREMENT RESTRICTIONS
\item N INTELLECTUAL PROPERTY
\item O RULES OF ORIGIN
\item {P EXPORT-RELATED MEASURES}
\end{itemize}

We leave out of the analysis P and L, since they are measures taken by
the exporting rather than the importing  country (in other words, they
affect the imports, but they are not the consequence of some policy of
the importing country).
\section{Correlation Analysis}
We calculate the total number of NTMs, broken by
1-digit codes, that each reporter (a set of 85 countries or country aggregates
including the EU28) adopts (sum of its NTMs on all the imports 
from any third country).

We then look at the structure of the correlations which are illustrated
in Figure \ref{cor-mat}. A screening of the correlation matrix reveals
several interesting properties
\begin{enumerate}
\item All the statistically significant correlations are positive.
\item Subindicators H and I are not significantly correlated to any other
  subindicator. We therefore choose to leave them out of the analysis.
 % \textcolor{red}{Is this a sound decision (statistically
 %    speaking)? Economically speaking it may make sense since I
 %    includes also measures affecting the producer and  not only the
 %    importer and the same applies to H.}
\item There is an extremely high correlation between subindicators N and
  O. This is a spurious correlation due to both O and N consisting
  primarily of zero values. As a consequence, they are also left out.
\end{enumerate}  

% \textcolor{red}{Discarding subindicators H, I, N and O is also the direct result of
% eliminating all the subindicators for which the non-zero values are less
% than $10\%$ than the total number of data.} If we believe in the
% integrity of the database (which does not explicitly mention missing
% data), the absence of information about a e.g. rules of origins
% (subindicator O)
% measures imposed by country A from country B should mean that the
% number of measures related to the rules of origins is zero and not
% missing. Several conversation with UNCTAD however leave ample space to doubt.

   
% % \end{itemize}

% We also notice the extremely high correlation between N and O.
% We do not have an explanation for that, since rules of origin and
% intellectual property are definitely two distinct categories of
% measures, but the level of correlation is such that we choose to
% discard indicator N.
% \begin{itemize}
% \item \textcolor{red}{Once again, any comments on this?}
% \end{itemize}  

\begin{figure}
\includegraphics[width=\columnwidth]{correlation_subindicators.pdf}
\caption{Correlation matrix. Crossed values are not statistically
  significant at the $p=0.05$ level.}
\label{cor-mat}
\end{figure}

\subsection{Outliers}

The remaining indicators are all affected by outliers, as one can see
in Figure \ref{outliers}. We are very reluctant to treat them, despite
the impact they may have on the PCA, because they are not supposed to
be measurement errors, but they stand for countries imposing an
unusually high number of NTMs on their imports.

% \textcolor{red}{Any thoughts on this?}





\begin{figure}
\includegraphics[width=\columnwidth]{indicators_box_plot2.pdf}
\caption{Boxplots of the NTM 1-digit distributions.}
\label{outliers}
\end{figure}
   

\section{Principal Component Analysis}
In this section we resort to principal component analysis (PCA) to
statistically determine the weights of the components of the NTM composite
indicator we intend to construct. In the following, unless otherwise stated, we will use the
terms component and factor interchangeably.
The methodology is taken from \cite{nicoletti} and \cite{oecd-composite}.

First, we carry out a PCA on the centred and scaled subindicators and we
determine the number of factors we want to include in the analysis.
According to Table \ref{table-pca} the first three components satisfy
the following conditions (laid out in Ref. \cite{nicoletti}).
\begin{itemize}
\item The associated eigenvalue is larger than $1$.
\item Each component accounts for at least $10\%$ of the total
  variance.
\item   Together, they account for more than $60\%$ of the total variance.
\end{itemize}  


% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Tue Nov 26 09:51:34 2019
\begin{table}[ht]
\centering
\caption{Summary statistics of PCA (without rotation).} 
\begin{tabular}{rrr}
  \toprule
Eigenvalue & Share of total variance & Cumulative share of variance \\ 
  \midrule
\bf{2.53} & \bf{0.32} & \bf{0.32} \\ 
   \rowcolor[gray]{0.9}\bf{1.49} & \bf{0.19} & \bf{0.50} \\ 
  \bf{1.11} & \bf{0.14} & \bf{0.64} \\ 
   \rowcolor[gray]{0.9}0.91 & 0.11 & 0.75 \\ 
  0.80 & 0.10 & 0.85 \\ 
   \rowcolor[gray]{0.9}0.66 & 0.08 & 0.94 \\ 
  0.32 & 0.04 & 0.98 \\ 
   \rowcolor[gray]{0.9}0.18 & 0.02 & 1.00 \\ 
   \bottomrule
\end{tabular}
\label{table-pca}
\end{table}


The second step consists in performing a PCA followed by a varimax
rotation by limiting the number of factors to three.
The loadings of the rotated components are provided in Table \ref{table-varimax}.

% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Tue Nov 26 10:29:58 2019
\begin{table}[ht]
\centering
\caption{Loadings of the rotated components (varimax rotation).} 
\begin{tabular}{lrrr}
  \toprule
Subindicator & Component 1 & Component 2 & Component 3 \\ 
  \midrule
A & 0.82 & 0.39 & 0.09 \\ 
   \rowcolor[gray]{0.9}B & 0.70 & 0.37 & -0.03 \\ 
  C & 0.38 & 0.38 & -0.10 \\ 
   \rowcolor[gray]{0.9}D & -0.05 & 0.88 & -0.04 \\ 
  E & 0.03 & 0.71 & 0.54 \\ 
   \rowcolor[gray]{0.9}F & 0.62 & -0.23 & 0.13 \\ 
  G & 0.08 & -0.02 & 0.95 \\ 
   \rowcolor[gray]{0.9}H & 0.63 & -0.13 & 0.03 \\ 
   \bottomrule
\end{tabular}
\label{table-varimax}
\end{table}

At this point, we follow the procedure by \cite{nicoletti}. First, we
calculate the normalised squared factor loadings, which are reported
in Table \ref{squared-loadings}.
We then do the following
\begin{enumerate}
\item we select the subindicators with the highest factors loadings in
intermediate composite indicators. They are highlighted in Table
\ref{squared-loadings};
\item we then weight each composite using the proportion of the
  variance explained in the data set. In order to do so we calculate
  the sum of the unnormalised squared factor loadings (explained
  variance) and we divide it by the total variance accounted for by
  the rotated factors (sum of the highlighted eigenvalues in Table \ref{table-pca}).
\end{enumerate}
  
Combining the results in Tables
\ref{squared-loadings}-\ref{squared-loadings2}, we get the
weights for the subindicators illustrated in Table
\ref{final-weights}.
Finally, although this has no impact on the ranking of the countries,
we normalise to one the sum of the weights of the indicators, as shown
in Table \ref{final-weights-norm}.





% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Tue Nov 26 10:49:08 2019
\begin{table}[ht]
\centering
\caption{Normalised squared loadings of the rotated components in
  Table \ref{table-varimax}.} 
\begin{tabular}{lrrr}
  \toprule
Subindicator & Component 1 & Component 2 & Component 3 \\ 
  \midrule
A & \bf{0.32} & 0.08 & 0.01 \\ 
   \rowcolor[gray]{0.9}B & \bf{0.23} & 0.08 & 0.00 \\ 
  C & 0.07 & \bf{0.08} & 0.01 \\ 
   \rowcolor[gray]{0.9}D & 0.00 & \bf{0.43} & 0.00 \\ 
  E & 0.00 & \bf{0.29} & 0.24 \\ 
   \rowcolor[gray]{0.9}F & \bf{0.18} & 0.03 & 0.01 \\ 
  G & 0.00 & 0.00 & \bf{0.73} \\ 
   \rowcolor[gray]{0.9}H & \bf{0.19} & 0.01 & 0.00 \\ 
   \bottomrule
\end{tabular}
\label{squared-loadings}
\end{table}



% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Tue Nov 26 12:47:14 2019
\begin{table}[ht]
\centering
\caption{Squared loadings of the rotated components in
  Table \ref{table-varimax}.} 
\begin{tabular}{lrrr}
  \toprule
Subindicator & Component 1 & Component 2 & Component 3 \\ 
  \midrule
A & 0.68 & 0.15 & 0.01 \\ 
   \rowcolor[gray]{0.9}B & 0.49 & 0.14 & 0.00 \\ 
  C & 0.15 & 0.14 & 0.01 \\ 
   \rowcolor[gray]{0.9}D & 0.00 & 0.77 & 0.00 \\ 
  E & 0.00 & 0.51 & 0.30 \\ 
   \rowcolor[gray]{0.9}F & 0.39 & 0.05 & 0.02 \\ 
  G & 0.01 & 0.00 & 0.90 \\ 
   \rowcolor[gray]{0.9}H & 0.40 & 0.02 & 0.00 \\ 
  \midrule
  Explained Variance & 2.11 & 1.78 & 1.23 \\ 
  Explained/Total Variance & \bf{0.41} & \bf{0.35} & \bf{0.24} \\ 
   \bottomrule
\end{tabular}
\label{squared-loadings2}
\end{table}

   
% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Tue Nov 26 14:41:44 2019
\begin{table}[ht]
\centering
\caption{Final weights for the subindicators.} 
\begin{tabular}{lr}
  \toprule
Subindicator & Weight \\ 
  \midrule
A & 0.13 \\ 
   \rowcolor[gray]{0.9}B & 0.10 \\ 
  C & 0.03 \\ 
   \rowcolor[gray]{0.9}D & 0.15 \\ 
  E & 0.10 \\ 
   \rowcolor[gray]{0.9}F & 0.08 \\ 
  G & 0.17 \\ 
   \rowcolor[gray]{0.9}H & 0.08 \\ 
   \bottomrule
\end{tabular}
\label{final-weights}
\end{table}



% latex table generated in R 3.6.2 by xtable 1.8-4 package
% Thu Feb  6 11:57:53 2020
\begin{table}[ht]
\centering
\caption{Final weights for the subindicators after normalisation.} 
\begin{tabular}{lr}
  \toprule
Subindicator & Weight \\ 
  \midrule
A & 0.16 \\ 
   \rowcolor[gray]{0.9}B & 0.12 \\ 
  C & 0.03 \\ 
   \rowcolor[gray]{0.9}D & 0.18 \\ 
  E & 0.12 \\ 
   \rowcolor[gray]{0.9}F & 0.09 \\ 
  G & 0.21 \\ 
   \rowcolor[gray]{0.9}H & 0.09 \\ 
   \bottomrule
\end{tabular}
\label{final-weights-norm}
\end{table}




% \section{Final Questions}
% Any feedback on the methodology (misunderstandings on our side;
% possible refinements, improved choice of the number of components, etc...) is more than welcome.
% If needed, we can provide more information (including the input data
% and the R code for the PCA calculations).

% We have a question about Table 6.2 in \cite{oecd-composite}, page
% 57: what is the normalisation of ``Expl./Tot'' (last line in the table)?
% We thought it should be normalised to $1$, like the ``Weight of
% factors in summary indicator'' in Tables 8,9 and 11 of
% \cite{nicoletti}. 


\clearpage

\bibliography{mybibfile} 
\bibliographystyle{apalike}


\end{document}