\documentclass[10pt,letterpaper]{bmcart}
\usepackage[top=0.85in,left=2.75in,footskip=0.75in,marginparwidth=2in]{geometry}

% use Unicode characters - try changing the option if you run into troubles with special characters (e.g. umlauts)
\usepackage[utf8]{inputenc}

% clean citations
\usepackage{natbib}
\usepackage{comment}
\usepackage{listings}
\usepackage{amsmath}

% hyperref makes references clicky. use \url{www.example.com} or \href{www.example.com}{description} to add a clicky url
\usepackage{nameref,hyperref}

% line numbers
\usepackage[right]{lineno}

% improves typesetting in LaTeX
\usepackage{microtype}
\DisableLigatures[f]{encoding = *, family = * }

 \usepackage{setspace}
% Remove % for double line spacing
%\usepackage{setspace} 
%\doublespacing

% use adjustwidth environment to exceed text width (see examples in text)
\usepackage{changepage}

% adjust caption style
\usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,singlelinecheck=off]{caption}

% remove brackets from references
\makeatletter
\renewcommand{\@biblabel}[1]{\quad#1.}
\makeatother

% headrule, footrule and page numbers
\usepackage{lastpage,fancyhdr,graphicx}
\usepackage{epstopdf}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\fancyheadoffset[L]{2.25in}
\fancyfootoffset[L]{2.25in}

% use \textcolor{color}{text} for colored text (e.g. highlight to-do areas)
\usepackage{color}

% define custom colors (this one is for figure captions)
\definecolor{Gray}{gray}{.25}

% this is required to include graphics
\usepackage{graphicx}

% use if you want to put caption to the side of the figure - see example in text
\usepackage{sidecap}

% use for have text wrap around figures
\usepackage{wrapfig}
\usepackage[pscoord]{eso-pic}
\usepackage[fulladjust]{marginnote}
\reversemarginpar



\newcommand{\rv}[1]{{\color{blue} [Revised] #1}}


% document begins here
\begin{document}

%\onecolumn %[\begin{@twocolumnfalse}
\section*{Appendix}

\renewcommand{\thesubsection}{\Alph{subsection}}

\rv{
\subsection{Copula definition and computation}

As stated in the main document, the copula of random variables $(X_1,...,X_d)$ corresponds to the joint cumulative distribution function (CDF) $C : [0,1]^d \rightarrow [0,1]$ of the uniformly distributed marginals $(U_1, ...,U_d)$. This means, that we first need to find the uniform multivariate distribution of the marginals. It is common practice to use the normalised ranked data, which corresponds to pseudo-observations defined as follows (see $pobs$ function in $R$\footnote{https://www.rdocumentation.org/packages/VineCopula/versions/2.2.0/topics/pobs}):

"Given $n$ realisations $x_i=(x_{i1},...,x_{id})^T$, $i \in \{i,...,n\}$ of a random vector $X$, the pseudo-observations are defined via $u_{ij}=r_{ij}/(n+1)$ for $i \in \{1,...,n\}$ and $j \in \{1,...,d\}$, where $r_{ij}$ denotes the rank of $x_{ij}$ among all $x_{kj}$, $k \in \{1,...,n\}$. This procedure ensures that the variates fall inside the open unit hypercube."

In order to make this research useful to the reader, we include below the algorithm used in this process for variables $x_t$ and $s$:}
\begin{lstlisting}
library(VineCopula)
#The pseudo-observations are constructed as follows
set.seed(500)
u <- pobs(as.matrix(cbind(x_t,s)))

#Computation of the copula
selectedCopula <- BiCopSelect(u[,1],u[,2],familyset=NA)
\end{lstlisting}
\rv{The output of this is the family of the copula with the estimated parameters through maximum likelihood. For 2007 we obtained:}
\begin{lstlisting}
Bivariate copula: Survival BB1 (par = 0.13, par2 = 1.02,
                                              tau = 0.08) 
\end{lstlisting}
\rv{where BB1 refers to the Clayton-Gumbel family, and survival is its rotation version by $180$ degrees. We took the initiative to fit the data to the BB1 function instead of its survival counterpart, since this one is better documented. After implementation, we found that the correlation between the $p_{ij}$ from the BB1 copula and its survival counterpart was bigger than 0.999. Hence the choice does not affect the results.
BB1 functions are part of \emph{Archimedean} copulas defined as follows (the following section is taken from \cite{brechmann2013cdvine}):
\begin{equation}
    C(u_1,u_2)=\phi^{[-1]}(\phi(u_1)+\phi(u_2))
\end{equation}
where $\phi:[0,1] \rightarrow [0,\infty]$ is a continuous strictly decreasing convex function such that $\phi(1)=0$ and $\phi^{[-1]}$ is the pseudo-inverse
\begin{equation*}
    \phi^{[-1]}(t)=
    \begin{cases}
    \phi^{-1}(t),       & \quad 0\leq t \leq \phi(0),\\
    0,  & \quad \phi(0)\leq t \leq \infty,
  \end{cases}
\end{equation*}
where $\phi$ is the \emph{generator function} of the copula $C$.

The generator function for the BB1 is given by
\begin{equation}
    \phi(t)=(t^{-\theta}-1)^\delta, \qquad \theta >0, \delta \geq 1.
\end{equation}
The parameter $\tau$ obtained from the fitting (see result from code) can be deduced from $\theta$ and $\delta$ as follows: $\tau=1-2/(\delta(\theta+2))$. The BB1 copulas fitted for the 2007 and 2014 data gave rise to the following parameters: $\theta_{2007}=0.028$, $\delta_{2007}=1.069$, $\theta_{2014}=0.013$, $\delta_{2014}=1.061$.
}


\subsection{Percolation using copula for $e^{-t}$ and $s$}
In the following subsections we look at the effect of constructing the network for the set of nodes $V$ given by the LSOAs, but using different weights for the links.

In this section we examine the effect of choosing a different function for time instead of $1/t$. Within transport modelling and spatial interaction models, the cost function is many times defined as either $1/t^{\beta}$ or as $e^{-\beta t}$. Let us therefore construct the copula using $x_t'=e^{-t}$ instead of $1/t$. 

Repeating the same steps as explained in the methodology, we obtain as the best copula fit, the same copula as for the case where we used $x_t'=1/t$, see Fig.~\ref{fig:copula_expt2007}. %Maps in Fig.~\ref{fig:clusters_expt2014} illustrate that these correspond to the same ones as in Fig.6 of the article.

\begin{figure}[h]
\centering
\includegraphics[width=1\textwidth]{copula_expt2007.png}
\caption{Copula for $e^{-t}$ and $s$ for London 2007. We see that this is the same as for $1/t$ and $s$ in Fig.4 of the article}
\label{fig:copula_expt2007}
\end{figure}

%\begin{figure}[h]
%\centering
%\includegraphics[width=0.45\textwidth]{Firms_London_expt_p0_999.png}
%\includegraphics[width=0.45\textwidth]{Firms_London_expt_p0_997.png}
%\includegraphics[width=0.45\textwidth]{Firms_London_expt_p0_995.png}
%\includegraphics[width=0.45\textwidth]{Firms_London_expt_p0_994.png}
%\caption{Geoindustrial clusters in 2014 for copula constructed using $e^{-t}$ and $s$. We obtain the same results as for $1/t$ and $s$, see Fig.6 in the main article.}
%\label{fig:clusters_expt2014}
%\end{figure}

%In order to create the nested structure, one needs to look at the places at which the continuous transitions take place. This can be done by looking at the evolution of the largest connected component. As expected, similar curves are obtained for the copula of $1/t$ and $s$, and for that of $e^{-t}$ and $s$, see Fig.~\ref{fig:transitions_2014}. The curve confirms that the main transitions of interest take place very close to 1, as expected from the shape of the copula. 

%\begin{figure}[h]
%\centering
%\includegraphics[width=1\textwidth]{transitions.png}
%\caption{Evolution of largest connected component for the copula of $1/t$ and $s$, left, and that of $e^{-t}$ and $s$, right.}
%\label{fig:transitions_2014}
%\end{figure}


It should not be surprising that the results are the same for the copula constructed using the two functions $1/t$ and $e^{-t}$. The copula is modelling the dependencies between the industrial similarities of the LSOAs and how fast one can get from one to the other. Specifically, we are looking for pairs of LSOAs that have a good connectivity in terms of public transport, and that have a similar ecosystem of industries. A shorter time $t$ means a higher connectivity, and a higher $s$ means high similarity, hence in order to have both variables reflecting a strong weight when both are high, etc, we need to transform $t$ into a new variable $x_t'=f(t)$, so that a high $x_t'$ corresponds to a strong connectivity.
\rv{It is important to remark, that the two functions, $1/t$ and $e^{-t}$, keep the ranks of the transformed variables in a similar way (they keep the positive sign and the order of observations). Therefore, since the copula function uses the normalised ranks of the pairs of variable values $t$ and $s$, rather than the raw values themselves (see how the pseudo-observations are generated in section A), the way time distances are transformed in our case (through $1/t$ or through $e^{-t}$) does not impact the results of the Copula and the clusters produced as a result.}

\subsection{Percolation using only similarity}
Let us now explore what would happen if we were to cluster the LSOAs according to their similarity only. In this case, we only consider the variable $s$ for the percolation process.

\begin{figure}[h]
\centering
\includegraphics[width=0.40\textwidth]{Firms_London_s2007_p0_98.png}
\includegraphics[width=0.40\textwidth]{Firms_London_s2014_p0_98.png}
\includegraphics[width=0.40\textwidth]{Firms_London_s2007_p0_96.png}
\includegraphics[width=0.40\textwidth]{Firms_London_s2014_p0_96.png}
\includegraphics[width=0.40\textwidth]{Firms_London_s2007_p0_94.png}
\includegraphics[width=0.40\textwidth]{Firms_London_s2014_p0_94.png}
\caption{Geoindustrial clusters in 2007 and 2014 using only similarity $s$.}
\label{fig:clusters_s}
\end{figure}

The Fig.~\ref{fig:clusters_s} shows that different clusters are obtained for the different years, nevertheless, the clusters are composed of units that seem to be spread all over London, and hence do not look anything like \emph{geographical clusters}.

\subsection{Percolation using only time}
In this section, the links of the network are only defined by the different functions for the travel time. The travel time network was constructed using the timetables for May 2016, and we are using this network for 2007 and 2014, hence we only need to investigate the clusters for one year to illustrate how it works. Note though, that given that the cluster size is defined according to the number of firms inside each cluster, a possible variation in the colours might exist between the two years. This is however not relevant for comparison purposes with other methodologies. 

\subsubsection*{Results for $t$, $1/t$ and $e^{-t}$}

Running the percolation process on the network defined by the travel time only, $t$, $1/t$ or $e^{-t}$, gives rise to clusters that correspond to accessible zones at different time scales, see Figs.~\ref{fig:clusters_t} 

\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{Firms_London_1_t_p0_43.png}
\includegraphics[width=0.45\textwidth]{Firms_London_1_t_p0_39.png}
\includegraphics[width=0.45\textwidth]{Firms_London_1_t_p0_37.png}
\includegraphics[width=0.45\textwidth]{Firms_London_1_t_p0_35.png}
\caption{Geoindustrial clusters using only time $1/t$.}
\label{fig:clusters_t}
\end{figure}

Overall, this exercise shows similarity or proximity given by time alone lead to results that are not satisfactory. The copula captures both aspects of the urban system. Of course further refinement can be obtained by using a more adequate measure of similarity or commuting flows.

\subsection{Diversity and concentration of firms}

Diversity defined by Shannon's entropy at the level of clusters (Fig.\ref{fig:SEI_clusters}) recalls the general pattern of Fig.3 in the article (where SEI is computed at the level of LSOAs) whereby central London, at the exception of Temple, appears highly diverse in terms of industries represented by business units. The aggregation at cluster level smooths the variations in the West, but it highlights the presence of high diversity clusters like Croydon or the City of London: i.e. clusters which are made of close LSOA with a similar mix of diverse business units.
\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{SEI_Firms_London_p0_999.png}
\includegraphics[width=0.45\textwidth]{SEI_Firms_London_p0_997.png}
\includegraphics[width=0.45\textwidth]{SEI_Firms_London_p0_995.png}
\includegraphics[width=0.45\textwidth]{SEI_Firms_London_p0_994.png}
\caption{Shannon's entropy of the clusters defined at a specific threshold $p$ for the copula of $1/t$ and $s$, London 2007.}
\label{fig:SEI_clusters}
\end{figure}

Using the HHI index of specialisation at the level of clusters, we mostly single out the small and specific cluster of Temple Fig.\ref{fig:HHI_clusters}, very specialised in law activities. Other specialised clusters tend to be located in the periphery of London.
\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{HHI_Firms_London_p0_999.png}
\includegraphics[width=0.45\textwidth]{HHI_Firms_London_p0_997.png}
\includegraphics[width=0.45\textwidth]{HHI_Firms_London_p0_995.png}
\includegraphics[width=0.45\textwidth]{HHI_Firms_London_p0_994.png}
\caption{Hirschman Herfindahl's index for the clusters defined at a specific threshold $p$ for the copula of $1/t$ and $s$, London 2007.}
\label{fig:HHI_clusters}
\end{figure}


\bibliography{library}
\bibliographystyle{apalike}

\end{document}