main.tex 35.6 KB
Newer Older
1 2 3 4 5 6 7 8
\IfFileExists{bioinfo.cls}{%
  \def\mode{0}%
  }{%
  \def\mode{1}%
}

\if 0\mode
  \documentclass{bioinfo}\usepackage[]{graphicx}\usepackage[]{color}
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 45 46 47 48 49 50 51 52 53 54 55 56 57
% maxwidth is the original width if it is less than linewidth
% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
  \ifdim\Gin@nat@width>\linewidth
    \linewidth
  \else
    \Gin@nat@width
  \fi
}
\makeatother

\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%
\let\hlipl\hlkwb

\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
 \def\at@end@of@kframe{}%
 \ifinner\ifhmode%
  \def\at@end@of@kframe{\end{minipage}}%
  \begin{minipage}{\columnwidth}%
 \fi\fi%
 \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
 \colorbox{shadecolor}{##1}\hskip-\fboxsep
     % There is no \\@totalrightmargin, so:
     \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
 \MakeFramed {\advance\hsize-\width
   \@totalleftmargin\z@ \linewidth\hsize
   \@setminipage}}%
 {\par\unskip\endMakeFramed%
 \at@end@of@kframe}
\makeatother

\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

58 59 60 61 62 63 64 65 66
\usepackage{alltt}%
  \copyrightyear{2015} \pubyear{2015}%
  \access{Advance Access Publication Date: Day Month Year}%
  \appnotes{Manuscript Category}%
\else
  \documentclass{article}%
  \newcommand\firstpage[1]{}
  \newcommand\subtitle[1]{}
\fi
67 68

\usepackage{amsmath}
69
\usepackage{multirow}
70

71 72 73


\DeclareMathOperator{\rpearson}{R}
74 75 76 77 78 79 80 81 82 83 84 85
\DeclareMathOperator{\ir}{IR}
\DeclareMathOperator{\covls}{CovLs}
\DeclareMathOperator{\rcovls}{RCovLs}
\DeclareMathOperator{\icovls}{ICovLs}
\DeclareMathOperator{\varls}{VarLs}
\DeclareMathOperator{\ivarls}{IVarLs}
\DeclareMathOperator{\rls}{RLs}
\DeclareMathOperator{\irls}{IRLs}
\DeclareMathOperator{\rv}{RV}
\DeclareMathOperator{\dcor}{dCor}

\DeclareMathOperator{\trace}{Trace}
86
\DeclareMathOperator{\diag}{Diag}
87
\DeclareMathOperator{\pvalue}{P_{value}}
88 89 90

\newcommand{\X}{\mathbf{X}}
\newcommand{\Y}{\mathbf{Y}}
91
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
92
\begin{document}
93

94 95 96 97
\firstpage{1}

\subtitle{Data and text mining}

98 99 100
\title[A modified $Rls$]{Assessing the shared variation among high-dimensional data matrices: a modified version of the Procrustean correlation coefficient}
\author[E. Coissac \textit{et~al}.]{E. Coissac\,$^{\text{\sfb 1,}*}$, Co-Author\,$^{\text{\sfb 2}}$ and C. Gonindard-Melodelima\,$^{\text{\sfb 1}}$}
\address{$^{\text{\sf 1}}$Université Grenoble Alpes, Université Savoie Mont Blanc, CNRS, LECA, Grenoble, F-38000, France \\
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
$^{\text{\sf 2}}$Department, Institution, City, Post Code,
Country.}

\corresp{$^\ast$To whom correspondence should be addressed.}

\history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}

\editor{Associate Editor: XXXXXXX}

\abstract{\textbf{Motivation:} Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text
Text Text Text Text Text.\\
\textbf{Results:} Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text  Text Text Text Text Text Text\\
\textbf{Availability:} Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text  Text\\
\textbf{Contact:} \href{eric.coissac@metabarcoding.org}{eric.coissac@metabarcoding.org}\\
\textbf{Supplementary information:} Supplementary data are available at \textit{Bioinformatics}
online.}

\maketitle




128 129 130 131 132 133 134
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% INTRODUCTION
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


135 136
\section{Introduction}

137
Multidimensional data and even high-dimensional data, where the number of variables describing each sample is far larger than the sample count, are now regularly produced in functional genomics (\emph{e.g.} transcriptomics, proteomics or metabolomics) and molecular ecology (\emph{e.g.} DNA metabarcoding). Using various techniques, the same sample set can be described by several multidimensional data sets, each of them describing a different facet of the samples. This invites using data analysis methods able to evaluate mutual information shared by these different descriptions. Correlative approaches can be a first and simple way to decipher pairwise relationships of those data sets.
138

Eric Coissac committed
139
Since a long time ago, several coefficients have been proposed to measure correlation between two matrices \citep[for a comprehensive review see][]{Ramsay:84:00}. But when applied to high-dimensional data, they suffer from the over-fitting effect leading them to estimate a high correlation even for unrelated data sets. Modified versions of some of these matrix correlation coefficients have been already proposed to tackle this problem. The $\rv_2$ coefficient \citep{Smilde:09:00} is correcting the original $\rv$ coefficient \citep{Escoufier:73:00} for over-fitting. Similarly, a modified version of the distance correlation coefficient $\dcor$ \citep{Szekely:07:00} has been proposed by \cite{SzeKely:13:00}. $\dcor$ has the advantage over the other correlation factors for not considering only linear relationships. Here we will focus on the Procrustes correlation coefficient $\rls$ proposed by \cite{Lingoes:74:00} and by \cite{Gower:71:00}. Let define $Trace$, a function summing the diagonal elements of a matrix. For a $ \; n \; \times \; p \; $ real matrix $\X$ and a second $ \; n \; \times \; q \; $ real matrix $\Y$ defining respectively two sets of $p$ and $q$ centered variables caracterizing $n$ individuals, we define $\covls(\X,\X)$ an analog of covariance applicable to vectorial data following Equation~(\ref{eq:CovLs})
140 141

\begin{equation}
142
\covls(\X,\Y) = \frac{\trace((\mathbf{XX}'\mathbf{YY}')^{1/2})}{n-1}
143 144 145
\label{eq:CovLs}
\end{equation}

146
and $\varls(\X)$ as $\covls(\X,\X)$. $\rls$ can then be expressed as follow in Equation~(\ref{eq:Rls}).
147 148

\begin{equation}
149 150
\rls(\X,\Y) = \frac{\covls(\X,\Y)}
                                   {\sqrt{\varls(\X)\;\varls(\Y)}}
151 152 153
\label{eq:Rls}
\end{equation}

154
Procrustean analyses have been proposed as a good alternative to Mantel's statistics for analyzing ecological data, and more generally for every high-dimensional data sets \citep{Peres-Neto:01:00}. Among the advantages of $\rls$, its similarity with the Pearson correlation coefficient $\rpearson$ \citep{Bravais:44:00} has to be noticed. Considering $\covls(\X,\Y)$ and $\varls(\X)$ respectively corresponding to the covariance of two matrices and the variance of a matrix,  Equation~(\ref{eq:Rls}) highlight the analogy between both the correlation coefficients. Moreover, when $p=1 \text{ and } q = 1,\; \rls = \lvert \rpearson \rvert$.
155

156 157 158 159 160 161
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% APPROACH
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

162 163 164 165 166
\section{Approach}

$\rls$ is part of the procruste framework that aims to superimpose a set of points with respect to another through three operations: a translation, a rotation and a scaling. The optimal transfert matrix $Rot_{X \rightarrow Y}$ can be estimated from the singular value decomposition (SVD) of the covariance matrix $X'Y$. SVD factorize any matrix as the product of three matrices (Equation~\ref{eq:SVD}).

\begin{equation}
167
\X'\Y=\mathbf{U \Sigma V}'
168 169 170
\label{eq:SVD}
\end{equation}

171
$\mathbf{U}$ and $\mathbf{V}$ are two rotation matrices allowing to compute the transfer matrix to superimpose $\X$ on $\Y$ or reciproquely $\Y$ on $\X$. All the elements of $\Sigma$ except its diagonal are equal to zero. The diagonal elements are the singular values. Singular values are the extention of the eigenvalues to non square matrices. $\covls(\X,\Y)$ can also be computed from singular values (Equation~\ref{eq:CovLsSVD}).
172 173

\begin{equation}
174
\covls(\X,\Y) = \frac{\trace(\mathbf{\Sigma})}{n-1}
175 176 177
\label{eq:CovLsSVD}
\end{equation}

178
This expression illustrates that actually $\covls(\X,\Y)$ is the variance of the projections of $\X$ on $\Y$ or of the reciproque projection. Therefore $\covls(\X,\Y)$ and $\rls(\X,\Y)$ are always positive and rotation independante. Here we propose to partitionate this variance in two components. A fisrt one corresponding to the actual shared information between $\X$ and $\Y$, and a second part that corresponds to what two random matrices of same structure than $\X$ and $\Y$ are sharing. This second part is estimated as $\overline{\rcovls(\X,\Y)}$ the mean of such random correlation. $\icovls(\X,\Y)$, the informative part of $\covls(\X,\Y)$, is computed using Equation~(\ref{eq:ICovLs}).
179 180

\begin{equation}
181
\icovls(\X,\Y) = Max \left\{ \begin{aligned}
182
                       \covls(\X,\Y) - \overline{\rcovls(\X,\Y)} &\\
183
                       0 &
184
                      \end{aligned}
185 186 187 188
              \right.
\label{eq:ICovLs}
\end{equation}

189 190 191 192 193 194 195 196
Similarly the informative counter-part of $\varls(\X)$ is defined as $\ivarls(\X)=\icovls(\X,\X)$,
and $\irls(\X,\Y)$ the informative Procruste correlation coefficient as follow.

\begin{equation}
\irls(\X,\Y)= \frac{\icovls(\X,\Y)}{\ivarls(\X)\;\ivarls(\Y)}
\label{eq:IRLs}
\end{equation}

197
Like $\rls(\X,\Y)$, $\irls(\X,\Y) \in [0;1]$ with the $0$ value corresponding to not correlation and the maximum value $1$ reached for two strictly homothetic data sets.
198

Eric Coissac committed
199
The corollary of $\icovls(\X,\Y)$ and $\ivarls(\X)$ definitions is that $\icovls(\X,\Y) \geqslant 0$ and $\ivarls(\X) > 0$. Therefore for $M=\{\mathbf{M}_1,\mathbf{M}_2,...,\mathbf{M}_k\}$ a set of $k$ matrices  with the same number of row, the informative covariance matrix $\mathbf{C}$ defined as $\mathbf{C}_{i,j} = \icovls(\mathbf{M}_i,\mathbf{M}_j)$ for is definite positive and symmetrical. This allows for defining the precision matrix $\mathbf{P}=\mathbf{C}^{-1}$  and the related partial correlation coefficent matrix $\irls_{partial}$ using Equation~(\ref{eq:IRls.partial})
200 201

\begin{equation}
202
\irls_{partial}(\mathbf{M}_i,\mathbf{M}_j) = \frac{\mathbf{P}_{i,j}}{\sqrt{P_{i,i}P_{j,j}}}
203 204 205
\label{eq:IRls.partial}
\end{equation}

206 207 208 209 210 211
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATERIAL & METHODS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

212 213 214
\begin{methods}
\section{Methods}

215
\subsection{Monte-Carlo estimation of $\overline{\rcovls(\X,\Y)}$}
216

217
For every values of $p$ and $q$ including $1$, $\overline{\rcovls(\X,\Y)}$ can be estimated using a serie of $k$ random matrices $RX=\{\mathbf{RX}_1,\mathbf{RX}_2,...,\mathbf{RX}_k\}$ and $RY=\{\mathbf{RY}_1,\mathbf{RY}_2,...,\mathbf{RY}_k\}$ where each $\mathbf{RX}_i$ and $\mathbf{RY}_i$ have the same structure respectively than $\X$ and $\Y$ in term of number of columns and of covariance matrix of these columns.
218 219

\begin{equation}
220
\overline{\rcovls(\X,\Y)} = \frac{\Sigma_{i=1}^k \covls(\mathbf{RX}_i,\mathbf{RY}_i)}{k}
221 222 223
\label{eq:RCovLsMC}
\end{equation}

Eric Coissac committed
224
Even when $\X=\Y$ to estimate $\ivarls(\X)$, $\overline{\rcovls(\X,\X)}$ is estimated with two independent sets of random matrix $RX$ and $RY$, both having the same structure than $\X$.
225

226
\subsubsection*{Empirical assessment of $\overline{\rcovls(\X,\Y)}$}
227 228


229

Eric Coissac committed
230
For two random vectors $\mathbf{x}$ and $\mathbf{y}$ of length $n$, the average coefficient of determination is $\overline{\rpearson^2}=1/(n-1)$. This value is independent of the distribution of the $\mathbf{x}$ and $\mathbf{y}$ values, but what about the independence of $\overline{\rcovls(\X,\Y)}$ to the distributions of $\X$ and $\Y$. To test this independance and to assess the reasonnable randomization effort needed to estimate $\overline{\rcovls(\X,\Y)}$, this value is estimated for four matrices $\mathbf{K},\,\mathbf{L},\,\mathbf{M},\,\mathbf{N}\,$ of $n=20$ rows and respectively $10, 20, 50, 100$ columns. Values of the four matrices are drawn from a normal or an exponential distribution, and $k \in \{10, 100, 1000\}$ randomizations are tested to estimate $\overline{\rcovls(\X,\Y)}$ and the respective standard deviation $\sigma(\overline{\rcovls(\X,\Y)})$. The $\varls$ of the generated matrices is equal to $1$ therefore the estimated $\covls$ are equals to $\rls$.
231 232 233 234 235





236

237
\subsection{Simulating data for testing sensibility to overfitting}
238 239 240



241
To test sensibility to overfitting correlations were mesured between two random matrices of same dimensions. Each matrix is $n \times p$ with $n=20$ and $p \in [2,50]$. Each $p$ variables are drawn from a centered and reduced normal distribution $\mathcal{N}(0,1)$. Eight correlation coefficients have been tested: $\rls$ the original procruste coefficient , $\irls$ this work, $\rv$ the original R for vector data \citep{Robert:76:00}, $\rv adjMaye$, $\rv 2$ and $\rv adjGhaziri$ three modified versions of $\rv$ \citep{El-Ghaziri:15:00,Mayer:11:00,Smilde:09:00}, $\dcor$ the original distance correlation coefficient \citep{Szekely:07:00} and \emph{dCor\_ttest} a modified version of $\dcor$ not sensible to overfitting \citep{SzeKely:13:00}. For each $p$ value, $100$ simulations were run. Computation of $\irls$ is estimated with $100$ randomizations.
242 243 244 245 246 247 248







249
For $p=1$ random vectors with $n \in [3,25]$ are generated. As above data are drawn from $\mathcal{N}(0,1)$ and $k=100$ simulations are run for each $n$. The original Pearson correlation coefficient $R$ and the modified version $\ir$ are used to estimate correlation between both vectors.
250 251 252 253 254 255 256







257 258
\subsection{Empirical assessment of the coefficient of determination}
The coefficient of determination ($\rpearson^2$) represente the part of shared variation between two variables. $\rls^2$ keeps the same meaning when applied to two matrices. But because of over-fitting $\rls$ and therefore $\rls^2$ are over-estimated.
259

260
\subsubsection*{between two matrices}
261 262 263



264
To test how the $\irls$ version of the coefficient of determination  $\irls^2$ can perform to evaluate the shared variation, pairs of random matrices were produced for two values of $p \in \{10,100\}$ and $n \in \{10,25\}$, and for several levels of shared variations ranging between $0.1$ and $1$ by step of $0.1$. For each combination of parameters, $k = 100$ simulations are run, and both $\rls^2$ and $\irls^2$ are estimated using $100$ randomizations.
265 266 267 268 269





270 271
\subsubsection*{between two vectors}

272 273 274 275 276 277 278 279 280 281 282 283 284 285 286


Coefficient of determination between two vectors also suffers from over-estimation when $n$ the number of considered points is small. On average for two random vectors of size $n$, $\overline{R^2}=1/(n-1)$. This random part of the shared variation inflates the observed shared variation even for not random vectors. In the context of multiple linear regression, \cite{Theil:58:00} proposed an adjusted version of the coefficient of determination (Equation~\ref{eq:r2adj}) correcting for both the effect of the number of vector considered ($p$) and of the vector size ($n$).

\begin{equation}
R^2_{adj}= 1 - (1 - R^2) \frac{n-1}{n-p-1}
\label{eq:r2adj}
\end{equation}

To evaluate the strength of that over-estimation and the relative effect of the correction proposed by \cite{Theil:58:00} and by $\irls$, pairs of random vectors were produced for  $n \in \{10,25\}$, and for several levels of shared variations ranging between $0.1$ and $1$ by step of $0.1$. For each combination of parameters, $k = 100$ simulations are run, and  $R^2$, $R^2_{adj}$ and $\irls^2$ are estimated using $100$ randomizations.





287 288 289 290
\subsubsection*{partial determination coefficients}

\begin{figure}[!tpb]%figure1

291 292


293 294 295
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig_nested_shared_variation-1} 
296

297 298 299 300
\end{knitrout}
\caption{Theoritical distribution of the shared variation between the four matrices $\mathbf{A},\,\mathbf{B},\,\mathbf{C},\,\mathbf{D}$, expressed in permille.}
\label{fig:nested_shared_variation}
\end{figure}
301

302
To evaluate capacity of partial determination coefficient $\irls_{partial}^2$ to distangle nested correlations, four matrices $\mathbf{A},\,\mathbf{B},\,\mathbf{C},\,\mathbf{D}$ of size $n \times p = 20 \times 200$ are generated according to the schema: $\mathbf{A}$ shares $80\%$ of variation with $\mathbf{B}$, that shares $40\%$ of variation with $\mathbf{C}$, sharing $20\%$ of variation with $\mathbf{D}$. These direct correlations induce indirect ones spreading the total variation among each pair of matricies according to Figure~\ref{fig:nested_shared_variation}. The simulation is repeadted $100$ times, for every simutation $\irls_{partial}^2$ and $\rls_{partial}^2$ are estimated for each pair of matrices.
303 304 305 306




307

308
\subsection{Testing significance of $\irls(\X,\Y)$}
309

310
Significance of $\irls(\X,\Y)$ can be tested using permutation test as defined in \cite{Jackson:95:00} or \cite{Peres-Neto:01:00} and implemented respectively in the \texttt{protest} method of the vegan R package \citep{Dixon:03:00} or the \texttt{procuste.rtest} method of the ADE4 R package \cite{Dray:07:00}.
311

312
It is also possible to take advantage of the Monte-Carlo estimation of $\overline{\rcovls(\X,\Y)}$ to test that $\icovls(\X,\Y)$ and therefore $\irls(\X,\Y)$ are greater than expected under random hypothesis. Let counting over the $k$ randomization when $\rcovls(\X,\Y)_k$ greater than $\covls(\X,\Y)$ name this counts $N_{>\covls}$. $\pvalue$ of the test can be estimated following Equation~(\ref{eq:pvalue}).
313

314 315 316 317 318 319 320 321 322
\begin{equation}
\pvalue= \frac{N_{>\covls}}{k}
\label{eq:pvalue}
\end{equation}

\subsubsection*{Empirical assessment of $\alpha\text{-risk}$ for the $\covls$ test}



Eric Coissac committed
323
To assess empirically the $\alpha\text{-risk}$ of the procruste test based on the randomisations realized during the estimation of $\overline{\rcovls(\X,\Y)}$, distribution of $P_{value}$ under the $H_0$ is compared to a uniform distribution between $0$ and $1$ ($\mathcal{U}(0,1)$). To estimate such empirical distribution,  $k=1000$ pairs of $n \times p$ random matrices with $n=20$ and
324
$p \in \{10, 20, 50\}$ are simulated under the null hypothesis of independancy. Procruste correlation between whose matrices is tested based on three tests. Our proposed test ($CovLs.test$), the \texttt{protest} method of the vegan R package and the \texttt{procuste.rtest} method of the ADE4 R package. Conformance of the distribution of each set of $k$ $P_{value}$ to $\mathcal{U}(0,1)$ is assessed using the Cramer-Von Mises test \citep{CSoRgo:96:00} implemented in the \texttt{cvm.test} function of the R package \texttt{goftest}.
325 326 327 328




329

330 331 332 333 334 335 336
\subsubsection*{Empirical power assessment for the $CovLs$ test}



To evaluate relative power of the three considered tests, pairs of to random matrices were produced for various $p \in \{10, 20, 50, 100\}$, $n \in \{10, 15, 20, 25\}$ and two levels of shared variations $\rpearson^2 \in \{0.05, 0.1\}$. For each combination of parameters, $k = 1000$ simulations are run. Each test are estimated based on $1000$ randomizations for the $CovLs$ test, or permutations for \texttt{protest} and \texttt{procuste.rtest}.


337 338


339 340 341 342

\vspace*{1pt}
\end{methods}

343 344 345 346 347 348
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% RESULTS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

349 350
\section{Results}

351 352 353 354 355
\subsection{Empirical assessment of $\overline{\rcovls(\X,\Y)}$}

\begin{table}[!t]
\processtable{Estimation of $\overline{\rcovls(\X,\Y)}$ according to the number of random matrices (k) aligned.\label{tab:mrcovls}}{
% latex table generated in R 3.5.2 by xtable 1.8-4 package
356
% Mon Sep  2 14:59:46 2019
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376
\begin{tabular}{rrrrrrr}
  \hline
  & & \multicolumn{2}{c}{normal} & & \multicolumn{2}{c}{exponential}\\ \cline{3-4}   \cline{6-7}p & k &\multicolumn{1}{c}{mean} & \multicolumn{1}{c}{sd} & \multicolumn{1}{c}{ } &\multicolumn{1}{c}{mean} & \multicolumn{1}{c}{sd}\\\hline\multirow{3}{*}{10} & 10 & 0.5746 & $1.3687 \times 10^{-2}$ &   & 0.5705 & $1.1714 \times 10^{-2}$ \\ 
   & 100 & 0.5824 & $3.6425 \times 10^{-3}$ &   & 0.5794 & $3.6452 \times 10^{-3}$ \\ 
   & 1000 & 0.5806 & $1.1564 \times 10^{-3}$ &   & 0.5801 & $1.1515 \times 10^{-3}$ \\ 
  \hline\multirow{3}{*}{20} & 10 & 0.7682 & $4.5568 \times 10^{-3}$ &   & 0.7729 & $7.4071 \times 10^{-3}$ \\ 
   & 100 & 0.7645 & $2.1681 \times 10^{-3}$ &   & 0.7695 & $2.0006 \times 10^{-3}$ \\ 
   & 1000 & 0.7658 & $6.8923 \times 10^{-4}$ &   & 0.7671 & $6.6033 \times 10^{-4}$ \\ 
  \hline\multirow{3}{*}{50} & 10 & 0.9131 & $3.4659 \times 10^{-3}$ &   & 0.9102 & $2.6647 \times 10^{-3}$ \\ 
   & 100 & 0.9088 & $8.9318 \times 10^{-4}$ &   & 0.9086 & $7.7424 \times 10^{-4}$ \\ 
   & 1000 & 0.9086 & $2.8590 \times 10^{-4}$ &   & 0.9091 & $2.8450 \times 10^{-4}$ \\ 
  \hline\multirow{3}{*}{100} & 10 & 0.9557 & $1.2939 \times 10^{-3}$ &   & 0.9532 & $1.7316 \times 10^{-3}$ \\ 
   & 100 & 0.9542 & $4.7043 \times 10^{-4}$ &   & 0.9547 & $4.6869 \times 10^{-4}$ \\ 
   & 1000 & 0.9544 & $1.4547 \times 10^{-4}$ &   & 0.9546 & $1.4249 \times 10^{-4}$ \\ 
   \hline
\end{tabular}

}{\ } % <- we can add a footnote in the last curly braces
\end{table}

Eric Coissac committed
377
Two main parameters can influence the Monte Carlo estimation of $\overline{\rcovls(\X,\Y)}$ : the distribution used to generate the random matrices and $k$ the number of random matrix pair. Two very different distribution are tested to regenerate the random matrices, the normal and the exponential distributions. The first one is symmetric where the second is not with a high probability for small values and a long tail of large ones. Despite the use of these contrasted distributions, estimates of $\overline{\rcovls(\X,\Y)}$ and of $\sigma(\overline{\rcovls(\X,\Y)})$ are identical if we assume the normal distribution of the  $\overline{\rcovls(\X,\Y)}$ estimator and a $0.95$ confidence interval of $\overline{\rcovls(\X,\Y)} \pm 2 \, \sigma(\overline{\rcovls(\X,\Y)})$ (Table~\ref{tab:mrcovls}).
Eric Coissac committed
378

379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
\subsection{Relative sensibility of $IRLs(X,Y)$ to overfitting}

\begin{figure}[!tpb]%figure1
A)

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig_h0-1} 

\end{knitrout}

B)

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig_h0_11-1} 

\end{knitrout}
\caption{A) Sensibility to overfitting for various correraltion coefficients. (A) Both simulated data sets are matrices of size $(n \times p)$ with $p > 1$. B) Correlated data sets are vectors ($p=1$) with a various number of individuals $n$ (vector length). A \& B) 100 simulations are run for each combination of parameters}
\label{fig:h0_overfit}
\end{figure}


402
$RLs$, like $RV$ and $dCor$, is sensible to overfitting which increase when $n$ decrease, and $p$ or $q$ increase. Because $RV$ is more comparable to $R^2$ when $RLs$ and $dCor$ are more comparable to $R$, $RV$ values increase more slowly than $RLs$ and $dCor$ values with $p$ (Figure~\ref{fig:h0_overfit}A). Because of its definition $IRLs$ values for non-correlated matrices are close to $0$ whatever $p$ (Figure~\ref{fig:h0_overfit}A).
403 404 405 406 407 408 409 410 411 412 413 414 415

\subsection{Evaluating the shared variation}

\subsubsection*{between two matrices}

$\rls$ can be considered for matrices as a strict equivalent of Pearson's $\rpearson$ for vectors. Therefore its squared value is an estimator of the shared variation between two matrices. But because of over-fitting the estimation is over-estimated. The proposed corrected vection ($\irls$) of that coefficient is able to provide a good estimate of the shared variation and is perfectly robust to the over-fitting phenomenon (Figure~\ref{fig:shared_variation}). Only a small over evalution is observable for the low values of simulated shared variation.

\begin{figure*}[!tpb]%figure1
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig__r2-1} 

\end{knitrout}
416
\caption{Shared variation ($R^2$) between two matrices is mesured using both the corrected ($\irls$) and the original ($\rls$) versions of the procrustean correlation coefficient. A gradiant of $R^2$ is simulated for two population sizes ($n \in \{10,25\}$) and two numbers of descriptive variables ($p \in \{10,100\}$). The distribution of differences between the observed and the simulated shared variation is ploted for each condition. The black dashed line corresponds to a perfect match where measured $R^2$ equals the simulated one.}
417 418 419 420 421
\label{fig:shared_variation}
\end{figure*}

\subsubsection*{between two vectors}

422 423 424 425 426 427 428 429 430 431 432 433
Vectors can be considered as a single column matrix, and the efficiency of $\irls^2$ to estimate shared variation between matrices can also be used to estimate shared variation between two vectors. Other formulas have been already proposed to better estimate shared variation between vectors in the context of linear models. Among them the one presented in Equation~\ref{eq:r2adj}, is the most often used and is the one implemented in R linear model summary function. On simulated data, $\irls^2$ performs better than the simple $R^2$ and its modified version $R^2_{adj}$ commonly used (Figure~\ref{fig:shared_variation_vector}). Whatever the estimator the bias decrease with the simulated shared variation. Nevertheless for every tested cases the median of the bias observed is smaller than with both other estimators, even if classical estimators well perfom for large values of shared variation.

\begin{figure}[!tpb]
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig__r2_vec-1} 

\end{knitrout}
\caption{Shared variation between two vectors is mesured using the classical $\rpearson^2$, its ajusted version $R^2_{adj}$ and ($\irls^2$). A gradiant of shared variation is simulated for two vector sizes ($n \in \{10,25\}$). The black dashed line corresponds to a perfect match where measured $R^2$ equals the simulated one.}
\label{fig:shared_variation_vector}
\end{figure}

434
\subsubsection*{partial coefficient of determination}
Eric Coissac committed
435
The simulated correlation network between the four matrices $\mathbf{A},\,\mathbf{B},\,\mathbf{C},\,\mathbf{D}$ induced moreover the direct simulated correlation a network of indirect correlation and therefore shared variances (Figure~\ref{fig:nested_shared_variation}). In such system, the interest of partial correlation coefficients and their associated partial determination coefficients is to measure correlation between a pair of variable without accounting for the part of that correlation which is explained by other variables, hence extracting the pure correlation between these two matrices. From Figure~\ref{fig:nested_shared_variation}, the expected partial shared variation between $\mathbf{A}$ and $\mathbf{B}$ is $480/(200+480)=0.706$; between $\mathbf{B}$ and $\mathbf{C}$, $64/(480+120)=0.107$; and between $\mathbf{C}$ and $\mathbf{D}$ $120/800=0.150$. All other partial coefficient are expected to be equal to $0$. The effect of the correction introduced in $\irls$ is clearly weaker and on the partial coefficient of determination (Figure~\ref{fig:nested_shared}) than on the full coefficient of determination (Figure~\ref{fig:shared_variation}). The spurious random correlations, constituting the over-fitting effect, is distributed over all the pair of matrices $\mathbf{A},\,\mathbf{B},\,\mathbf{C},\,\mathbf{D}$.
436 437 438 439 440 441 442 443 444 445 446 447

\begin{figure}[!tpb]%figure1
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=\maxwidth]{figure/fig_nested_shared-1} 

\end{knitrout}
\caption{Estimation error on the partial determination coefficient. Error is defined as the absolute value of the difference between the expected and the estimated partial $R^2$ using the corrected $\irls_{partial}$ and not corrected $\rls_{partial}$ procruste correlation coefficient.}
\label{fig:nested_shared}
\end{figure}


448 449 450 451 452 453 454 455 456 457
\subsection{$p_{value}$ distribution under null hyothesis}

As expected, $P_{values}$ of the $CovLs$ test based on the estimation of $\overline{RCovLs(X,Y)}$ are uniformely distributed under $H_0$.
whatever the $p$ tested (Table~\ref{tab:alpha_pvalue}). This ensure that the probability of a $P_{value} \leqslant \alpha\text{-risk}$ is equal to $\alpha\text{-risk}$. Moreover $P_{values}$ of the $CovLs$ test are strongly linerarly correlated with those of both the other tests ($R^2=0.996$ and $R^2=0.996$ respectively for the correlation with \texttt{vegan::protest} and \texttt{ade4::procuste.rtest} $P_{values}$). The slopes of the corresponding linear models are respectively $0.998$ and $0.999$.

\begin{table}[!t]
\processtable{$P_{values}$ of the Cramer-Von Mises test of conformity
                        of the distribution of $P_{values}$ correlation test to $\mathcal{U}(0,1)$
                        under the null hypothesis.\label{tab:alpha_pvalue}} {
% latex table generated in R 3.5.2 by xtable 1.8-4 package
458
% Mon Sep  2 14:59:50 2019
459
\begin{tabular*}{0.98\linewidth}{@{\extracolsep{\fill}}crrr}
460 461 462
  \hline
  & \multicolumn{3}{c}{Cramer-Von Mises p.value} \\
           \cline{2-4}
463
           p & CovLs test & \texttt{protest} & \texttt{procuste.rtest} \\  \hline
464 465 466 467
10 & 0.323 & 0.395 & 0.348 \\ 
  20 & 0.861 & 0.769 & 0.706 \\ 
  50 & 0.628 & 0.783 & 0.680 \\ 
   \hline
468
\end{tabular*}
469 470 471 472 473 474

}{} % <- we can add a footnote in the last curly praces
\end{table}

\subsection{Power of the test based on randomisation}

Eric Coissac committed
475
Power of the $CovLs$ test based on the estimation of $\overline{RCovLs(X,Y)}$ is equivalent of the power estimated for both \texttt{vegan::protest} and \texttt{ade4::procuste.rtest} tests (Table \ref{tab:power}). As for the two other tests, power decreases when the number of variable ($p$ or $q$) increases, and increase with the number of individuals and the shared variation. The advantage of the test based on the Monte-Carlo estimation of $\overline{RCovLs(X,Y)}$ is to remove the need of running a supplementary set of permutations when $\irls$ is computed.
476

477
\begin{table}[!t]
478
\processtable{Power estimation of the procruste tests for two low level of shared variations $5\%$ and $10\%$.\label{tab:power}} {
479
% latex table generated in R 3.5.2 by xtable 1.8-4 package
480
% Mon Sep  2 14:59:50 2019
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
\begin{tabular}{lcrrrrrrrrr}
  \hline
  & $R^2$ & \multicolumn{4}{c}{5\%} & &\multicolumn{4}{c}{10\%} \\
           \cline{3-6} \cline{8-11}
           & p & 10 & 20 & 50 & 100 & & 10 & 20 & 50 & 100 \\
           \cline{3-11}
           & n & \multicolumn{9}{c}{$power = 1 - \beta\text{-risk}$ } \\ \hline\multirow{4}{*}{Covls.test} & 10 & 0.49 & 0.45 & 0.40 & 0.45 &   & 0.76 & 0.68 & 0.70 & 0.68 \\ 
   & 15 & 0.88 & 0.80 & 0.75 & 0.75 &   & 0.99 & 0.98 & 0.96 & 0.95 \\ 
   & 20 & 0.99 & 0.96 & 0.94 & 0.93 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
   & 25 & 1.00 & 1.00 & 0.99 & 0.98 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
  \hline\multirow{4}{*}{protest} & 10 & 0.50 & 0.45 & 0.40 & 0.45 &   & 0.77 & 0.70 & 0.70 & 0.68 \\ 
   & 15 & 0.88 & 0.80 & 0.75 & 0.75 &   & 0.99 & 0.98 & 0.96 & 0.95 \\ 
   & 20 & 0.99 & 0.96 & 0.94 & 0.93 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
   & 25 & 1.00 & 1.00 & 0.99 & 0.99 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
  \hline\multirow{4}{*}{procuste.rtest} & 10 & 0.50 & 0.45 & 0.41 & 0.45 &   & 0.76 & 0.69 & 0.70 & 0.68 \\ 
   & 15 & 0.88 & 0.80 & 0.74 & 0.75 &   & 0.99 & 0.98 & 0.96 & 0.96 \\ 
   & 20 & 0.99 & 0.96 & 0.94 & 0.93 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
   & 25 & 1.00 & 1.00 & 0.99 & 0.99 &   & 1.00 & 1.00 & 1.00 & 1.00 \\ 
   \hline
\end{tabular}
501

502 503
}{} % <- we can add a footnote in the last curly praces
\end{table}
504

505 506 507 508 509 510
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DISCUSSION
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

511 512
\section{Discussion}

513
Correcting the over-adjustment effect on metrics assessing the relationship between high dimension datasets is a constant effort over the past decade. Therefore, $\irls$ can be considered as a continuation of the extension of the toolbox available to biologists for analyzing their omics data. The effect of the proposed correction on the classical $\rls$ coefficient is as strong as the other ones previously proposed for other correlation coefficients measuring relationship between vector data \citep[see Figure~\ref{fig:shared_variation}, e.g.][]{Smilde:09:00,SzeKely:13:00}. When applied to univariate data, $\rls$ is equal to the absolute value of the Pearson correlation coefficient, hence, and despite it is not the initial aim of that coefficient, $\irls$ can also be used to evaluate correlation between two univariate datasets. Using $\irls$ for such data sets is correcting for spurious correlations when the number of individual is small more efficiently than classical correction \citep[see Figure~\ref{fig:shared_variation_vector},][]{Theil:58:00}.
514

515 516 517
The main advantage of $\irls$ over other matrix correlation coefficients is that it allows for estimating shared variation between two matrices according to the classical definition of variance partitioning used with linear models. This opens the opportunity to develop linear models to explain the variation of a high dimension dataset by a set of other high dimension data matrices.

The second advantage of $\irls$ is that its definition  implies that the variance/co-variance matrix of a set of matrices is positive-definite. That allows for estimating partial correlation coefficients matrix by inverting the variance/co-variance matrix. The effect of the correction is less strong on such partial coefficients  than on full correlation, but the partial coefficients that should theoretically be estimated to zero seem to be better identified after the correction.
518 519 520 521 522 523 524 525 526 527 528 529



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     please remove the " % " symbol from \centerline{\includegraphics{fig01.eps}}
%     as it may ignore the figures.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\section{Conclusion}
530 531

A common approach to estimate strengh of the relationship between two variables is to estimate the part of shared variation. This single value ranging from zero to one is easy to interpret. Such value can also be computed between two sets of variable, but the estimation is more than for simple vector data subject to over estimation because the over-fitting phenomena which is amplified for high dimensional data. With $\irls$ and its squared value, we propose an easy to compute correlation and determination coefficient far less biased than the original Procrustean correlation coefficient. Every needed function to estimate the proposed modified version of these coefficients are included in a R package ProcMod available for download from the Comprehensive R Archive Network (CRAN).
532

533
\vspace*{-10pt}
534 535


536
\section*{Acknowledgements}
537

538 539 540 541
Text Text Text Text Text Text  Text Text.
Text Text Text Text Text Text  Text Text.
Text Text Text Text Text Text  Text Text.
\vspace*{-12pt}
542

543
\section*{Funding}
544

545 546
This work has been supported by the... Text Text  Text Text.
\vspace*{-12pt}
547

548 549 550 551 552 553 554 555
\bibliographystyle{natbib}
%\bibliographystyle{achemnat}
%\bibliographystyle{plainnat}
%\bibliographystyle{abbrv}
%\bibliographystyle{bioinformatics}
%
%\bibliographystyle{plain}
%
556
\bibliography{../inst/REFERENCES}
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572

\renewcommand\thesubsection{\Alph{subsection}}

\section*{Appendix}
\subsection{Notations}

\begin{tabular}{p{2cm}p{5cm}}
$\mathbf{x}$ (vector)         & bold lowercase. \\
$\X$ (matrix)         & bold uppercase. \\
$i = 1,..., n$                & object index. \\
$j = 1,..., p$                & variable index. \\
$k$                           & iteration index. \\
$\X'$                 & The transpose of $\X$. \\
$\X \Y$       & Matrix multiplication of $\X$ and $\Y$. \\
$\diag(\X)$           & A column matrix composed of the diagonal
                                elements of $\X$. \\
Eric Coissac committed
573
$\trace(\X)$           & The trace of $\X$.
574 575 576
\end{tabular}


577
\end{document}