Answers.Body: <p>Not entirely clear on what you're asking but the beta estimates in LDSC come from GWAS summary statistics. As I understand it, they aren't &quot;derived&quot; so much as just set equivalent to what they linear model defines them as, which is their additive effects on the phenotype as implied by the model. So for each SNP j, it's effect size (beta) is whatever difference one copy of the allele makes on the phenotype (phi), divided by N, the number of SNPs.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-22T17:31:50.813Z
Answers.Text: Accepting your answer, I think I misunderstood the phrasing in the supplementary note, it is indeed only a way of defining a weighted effect on the explained output, nothing to do with least squares solution...
Answers.UserDisplayName: Vasilis Lemonidis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-11T19:44:25.777Z
Answers.Text: Sorry for being late, but what do you mean by the phrasing "equivalent to what the linear model defines them as"? If only the linear model solution was considered, then the estimated beta-s would be the pseudo-inverse of X times X' times phi, namely the least squares solution.
Answers.UserDisplayName: Vasilis Lemonidis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T15:21:39.470Z
Answers.LastActivityDate: 2022-04-02T15:21:39.470Z
Answers.UserDisplayName: user15286
Body: <p>I am trying to understand the derivations from <a href="https://www.nature.com/articles/ng.3211" rel="nofollow noreferrer">Sullivan et al. (2015)</a> in the <a href="https://static-content.springer.com/esm/art%3A10.1038%2Fng.3211/MediaObjects/41588_2015_BFng3211_MOESM39_ESM.pdf" rel="nofollow noreferrer">Supplementary Material</a>. There, it is mentioned in the first page that the least squares estimate of the j-th SNP effect, considering the polygenicity linear model <span class="math-container">$φ=Xβ + ε$</span>, is <span class="math-container">$\hat{β_j} := X^T_j φ/N$</span> . Normally, the least squares solution of <span class="math-container">$\hat{\beta}$</span> is <span class="math-container">$(X^TX)^{-1}X^T\phi$</span>. By comparing the two equations with each other, this means that, in this case, <span class="math-container">$X^TX=N I_{M\times M}$</span>. However, LD is assumed, therefore <span class="math-container">$E(X_{ij}X_{ik})\neq 0$</span>, so the covariance matrix cannot be diagonal. Could someone explain to me how the derivation for the beta estimate was performed, please? What am I missing? I checked that the same thing is mentioned in more than one sources such as <a href="https://static-content.springer.com/esm/art%3A10.1038%2Fng.3404/MediaObjects/41588_2015_BFng3404_MOESM34_ESM.pdf" rel="nofollow noreferrer">here</a>.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-13T03:11:42.853Z
Comments.Text: I still don't understand what you're asking. If you want to try and rephrase your question I can give it a shot, but I'm not sure where the confusion lies right now.
Comments.UserDisplayName: user15286
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-14T10:13:30.340Z
Comments.Text: I edited the question, I hope now it is clearer what is the mathematical issue I am having trouble understanding.
Comments.UserDisplayName: Vasilis Lemonidis
Tags: <r><gwas><phylogenetics>
Title: LD Score Regression Derivation hard to follow
ThreadText: # LD Score Regression Derivation hard to follow
  
  (Asked by: username_0 on 2022-02-16)
  
  I am trying to understand the derivations from [Sullivan et al. (2015)](https://www.nature.com/articles/ng.3211) in the [Supplementary Material](https://static-content.springer.com/esm/art%3A10.1038%2Fng.3211/MediaObjects/41588_2015_BFng3211_MOESM39_ESM.pdf). There, it is mentioned in the first page that the least squares estimate of the j-th SNP effect, considering the polygenicity linear model $φ=Xβ + ε$, is $\hat{β\_j} := X^T\_j φ/N$ . Normally, the least squares solution of $\hat{\beta}$ is $(X^TX)^{-1}X^T\phi$. By comparing the two equations with each other, this means that, in this case, $X^TX=N I\_{M\times M}$. However, LD is assumed, therefore $E(X\_{ij}X\_{ik})\neq 0$, so the covariance matrix cannot be diagonal. Could someone explain to me how the derivation for the beta estimate was performed, please? What am I missing? I checked that the same thing is mentioned in more than one sources such as [here](https://static-content.springer.com/esm/art%3A10.1038%2Fng.3404/MediaObjects/41588_2015_BFng3404_MOESM34_ESM.pdf).
  
  **Tags:** r, gwas, phylogenetics
  
  > **Comments:**
  > **username_1**: I still don't understand what you're asking. If you want to try and rephrase your question I can give it a shot, but I'm not sure where the confusion lies right now.  
  > **username_0**: I edited the question, I hope now it is clearer what is the mathematical issue I am having trouble understanding.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-04-02. Score: 2 | Accepted answer
  
  Not entirely clear on what you're asking but the beta estimates in LDSC come from GWAS summary statistics. As I understand it, they aren't "derived" so much as just set equivalent to what they linear model defines them as, which is their additive effects on the phenotype as implied by the model. So for each SNP j, it's effect size (beta) is whatever difference one copy of the allele makes on the phenotype (phi), divided by N, the number of SNPs.
  
  > **Comments:**
  > **username_0**: Sorry for being late, but what do you mean by the phrasing "equivalent to what the linear model defines them as"? If only the linear model solution was considered, then the estimated beta-s would be the pseudo-inverse of X times X' times phi, namely the least squares solution.  
  > **username_0**: Accepting your answer, I think I misunderstood the phrasing in the supplementary note, it is indeed only a way of defining a weighted effect on the explained output, nothing to do with least squares solution...  
  
  ---
  
  