User:Timothee Flutre/Notebook/Postdoc/2011/11/10
From OpenWetWare
(→Entry title: first version) 
(→Bayesian model of univariate linear regression for QTL detection: add conditional posterior of B) 

Line 15:  Line 15:  
  * '''Goal''': we want  +  * '''Goal''': we want to assess the evidence in the data for an effect of the genotype on the phenotype. 
Line 45:  Line 45:  
<math>B  \tau \sim \mathcal{N}(\vec{0}, \, \tau^{1} \Sigma_B) \text{ with } \Sigma_B = diag(\sigma_{\mu}^2, \sigma_a^2, \sigma_d^2)</math>  <math>B  \tau \sim \mathcal{N}(\vec{0}, \, \tau^{1} \Sigma_B) \text{ with } \Sigma_B = diag(\sigma_{\mu}^2, \sigma_a^2, \sigma_d^2)</math>  
+  
+  
+  * '''Joint posterior''':  
+  
+  <math>\mathsf{P}(\tau, B  Y, X) = \mathsf{P}(\tau  Y, X) \mathsf{P}(B  Y, X, \tau)</math>  
+  
+  
+  * '''Conditional posterior of B''':  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) = \mathsf{P}(B, Y  X, \tau)</math>  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) = \frac{\mathsf{P}(B, Y  X, \tau)}{\mathsf{P}(Y  X, \tau)}</math>  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) = \frac{\mathsf{P}(B  \tau) \mathsf{P}(Y  X, B, \tau)}{\int \mathsf{P}(B  \tau) \mathsf{P}(Y  X, \tau, B) \mathsf{d}B}</math>  
+  
+  Here and in the following, we neglect all constants (e.g. normalization constant, <math>Y^TY</math>, etc):  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto \mathsf{P}(B  \tau) \mathsf{P}(Y  X, \tau, B)</math>  
+  
+  We use the prior and likelihood and keep only the terms in <math>B</math>:  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto exp(B^T \Sigma_B^{1} B) exp((YXB)^T(YXB))</math>  
+  
+  We expand:  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto exp(B^T \Sigma_B^{1} B  Y^TXB B^TX^TY + B^TX^TXB)</math>  
+  
+  We factorize some terms:  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto exp(B^T (\Sigma_B^{1} + X^TX) B  Y^TXB B^TX^TY)</math>  
+  
+  Let's define <math>\Omega = (\Sigma_B^{1} + X^TX)^{1}</math>. We can see that <math>\Omega^T=\Omega</math>, which means that <math>\Omega</math> is a [http://en.wikipedia.org/wiki/Symmetric_matrix symmetric matrix].  
+  This is particularly useful here because we can use the following equality: <math>\Omega^{1}\Omega^T=I</math>.  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto exp(B^T \Omega^{1} B  (X^TY)^T\Omega^{1}\Omega^TB B^T\Omega^{1}\Omega^TX^TY)</math>  
+  
+  This now becomes easy to factorizes totally:  
+  
+  <math>\mathsf{P}(B  Y, X, \tau) \propto exp((B^T  \Omega X^TY)^T\Omega^{1}(B  \Omega X^TY))</math>  
+  
+  We recognize the [http://en.wikipedia.org/wiki/Kernel_%28statistics%29 kernel] of a Normal distribution, allowing us to write the conditional posterior as:  
+  
+  <math>B  Y, X, \tau \sim \mathcal{N}(\Omega X^TY, \tau^{1} \Omega)</math>  
<! ##### DO NOT edit below this line unless you know what you are doing. ##### >  <! ##### DO NOT edit below this line unless you know what you are doing. ##### > 
Revision as of 12:30, 21 November 2012
Project name  Main project page Previous entry Next entry 
Bayesian model of univariate linear regression for QTL detectionSee Servin & Stephens (PLoS Genetics, 2007).
with: where β_{1} is in fact the additive effect of the SNP, noted a from now on, and β_{2} is the dominance effect of the SNP, d = ak. Let's now write in matrix notation: Y = XB + E where which gives the following conditional distribution for the phenotypes:
Here and in the following, we neglect all constants (e.g. normalization constant, Y^{T}Y, etc):
We use the prior and likelihood and keep only the terms in B:
We expand:
We factorize some terms:
Let's define . We can see that Ω^{T} = Ω, which means that Ω is a symmetric matrix. This is particularly useful here because we can use the following equality: Ω^{ − 1}Ω^{T} = I.
This now becomes easy to factorizes totally:
We recognize the kernel of a Normal distribution, allowing us to write the conditional posterior as:
