Raw File
Tip revision: 33a6b14e3083b370e7f0a209b18b45a26c5529f1 authored by Vasilios Karageorgiou on 25 May 2023, 18:42:06 UTC
Tip revision: 33a6b14
Sparse Component Analysis in Mendelian Randomization

This repository includes code on performing sparse component analysis (SCA) [ ], a sparse dimensionality reduction approach shown to perform well in highly correlated data, in summary data of genetic variant-exposure associations, and then use this to investigate potential causal associations with Mendelian Randomization. SCA outperformed other sparse modalities in the authors' simulation studies. 

We provide a function that 
a) receives the SNP-exposure and SNP-outcome effect sizes and corresponding standard errors,
b) performs SCA of the SNP-exposure associations and,
c) in a second step, performs an inverse-variance weighted meta-analysis of the SCA-transformed SNP-exposure data and the SNP-outcome association, in line with the two-sample MR approach [].

<b>Function Information:</b>
<li>Input: Harmonised SNP-X and SNP-Y effect estimates should be provided</li>
<li>Sparsity: The estimation of the sparsity parameter is based on publicly available code from the Witten and Tibshirani  <i>PMA</i> R package []. It involves an n-fold cross-validation and a choice of the sparsity parameter that minimises the sum of the squared errors in the left-out data.</li>
<li>Causal Estimation: The effect sizes are not readily interpretable as the linear transformations skew the magnitude of the results. Interpretation of the direction and significance of the result, rather than the magnitude of the point estimate, are more intuitive.</li>
<li>It is helpful to visualise the transformation procedure with heatmaps. The following plot is generated with base R code and an R Color Brewer palette []. The positive loadings (in blue) indicate that the direction of the effects is faithful to the original data.</li>


back to top