Last updated: 2020-02-04

Checks: 2 0

Knit directory: Note/

This reproducible R Markdown analysis was created with workflowr (version 1.5.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.Rhistory

Unstaged changes:
    Modified:   analysis/bibliography.bib

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
Rmd 0d7507b zouyuxin 2020-02-05 wflow_publish(“analysis/pi-MASS.Rmd”)
html 448f2fb zouyuxin 2020-02-05 Build site.
Rmd 3fc7354 zouyuxin 2020-02-05 wflow_publish(“analysis/pi-MASS.Rmd”)

Guan and Stephens (2011) examine the potential to apply Bayesian Variable Selection Regression to GWAS, which requires MCMC. They emphasize that, unlike penalized regression approaches, BVSR naturally produces easily-interpretable measures of confidence — specifically, posterior probabilities — that individual covariates have nonzero regression coefficients.

Model

They define a binary indicator that indicate which element of \(\beta\) are nonzero, \(\gamma = (\gamma_1, \cdots, \gamma_p) \in \{0,1\}^p\). \[ y | \gamma, \mu, \beta, X, \tau \sim N_n( \mu + X_{\gamma}\beta_{\gamma}, \tau^{-1}I_n) \] \(X_\gamma\) denotes the design matrix \(X\) restricted to those columns \(j\) for which \(\gamma_j = 1\), \(\beta_\gamma\) denotes a corresponding vector of regression coefficients.

Priors

The priors are \[\begin{align*} \tau &\sim \Gamma(\lambda/2, \kappa/2) \\ \mu | \tau &\sim N(0, \sigma_{\mu}^2/\tau) \\ \gamma_j &\sim Bernoulli(\pi) \\ \beta_\gamma | \tau, \gamma &\sim N_{|\gamma|}(0, (\sigma_a^2/\tau) I_{|\gamma|}) \\ \beta_{-\gamma} | \gamma &\sim \delta_0, \end{align*}\]

where \(|\gamma| = \sum_j \gamma_j\). Hyperparameters are \(\pi, \sigma_a, \lambda, \kappa, \sigma_\mu\). Rather than setting \(\pi\) and \(\sigma_a\) to prespecified values, they place priors on them, hence allowing their values to be informed by the data. The remaining hyperparameters are less critical, and they consider the posterior distributions for which \(\sigma_\mu \rightarrow \infty\) and \(\lambda, \kappa \rightarrow 0\), which has the attractive property that the resulting relative marginal likelihoods for \(\gamma\) are invariant to shifting or scaling of \(y\).

A uniform prior on \(\pi\) seems inappropriate, since this would inevitably place most of the prior mass on larger numbers of covariates (uniform on \(10^{-5}\) to \(10^{-3}\) puts about 90% probability on \(>10^{-4}\)). Instead, the prior on \(\log \pi\) is \[ \log \pi \sim U(\log(1/p), \log(M/p)) \]

Scaling the covariates to each have unit variance corresponds to a prior assumption that SNPs with less variable genotypes (lower MAF) have larger effect sizes.

Let \(V(\beta, \tau)\) denote the empirical variance of \(X\beta\) relative to the residual variance \(\tau^{-1}\). \[ V(\beta, \tau) = \frac{1}{n}\sum_{i=1}^{n} [(X\beta)_i]^2 \tau \] which assumes that the covariates have been centered (\(X\beta\) has mean 0). The PVE is \[ PVE(\beta, \tau) = V(\beta, \tau)/(1+ V(\beta, \tau)) \] The aim is to choose a prior on \(\beta\) given \(\tau\) so that the induced prior on \(PVE(\beta, \tau)\) is approximately uniform.

\[ \nu(\gamma, \sigma_a) = E\left[ V(\beta, \tau) | \gamma, \sigma_a, \tau \right] = \sigma_a^2 \sum_{j:\gamma_j = 1} s_j \] where \(s_j = \frac{1}{n}\sum_{i=1}^{n}x_{ij}\) is the variance of covariate \(j\). Define \[ h(\gamma, \sigma_a) = \frac{\nu(\gamma, \sigma_a)}{1+\nu(\gamma, \sigma_a)} \] which gives a rough guide to the expectation of PVE for a given \(\gamma\) and \(\sigma_a\). They specify a uniform prior on \(h\), independent of \(\gamma\), which induces a prior on \(\sigma_a\) given \(\gamma\) via \[ \sigma_a^2(h, \gamma) = \frac{h}{1-h}\frac{1}{\sum_{j:\gamma_j = 1} s_j}. \]

Posterior

The posterior of \((h, \pi, \gamma)\) is \[ p(h, \pi, \gamma | y) \propto p(y | h, \gamma) p(h) p(\gamma|\pi)p(\pi) \]

Estimating PIP using Rao-Blackwellized estimate, \[ P(\gamma_j = 1|y) \approx \frac{1}{M} \sum_{i=1}^{M}P(\gamma_j = 1|y, \gamma_{-j}^{(i)}, \beta_{-j}^{(i)}, \tau^{(i)}, h^{(i)}, \pi^{(i)}) \] where \(\gamma^{(i)}, \beta^{(i)}, \tau^{(i)}, h^{(i)}, \pi^{(i)}\) denote the \(i\)th MCMC sample.

Guan, Yongtao, and Matthew Stephens. 2011. “Bayesian Variable Selection Regression for Genome-Wide Association Studies and Other Large-Scale Problems.” The Annals of Applied Statistics. JSTOR, 1780–1815.