Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do about lambda_GC? #40

Open
privefl opened this issue Jun 17, 2019 · 5 comments
Open

What to do about lambda_GC? #40

privefl opened this issue Jun 17, 2019 · 5 comments

Comments

@privefl
Copy link
Owner

privefl commented Jun 17, 2019

Currently, lambda_GC(X2) = lambda_GC(Z)^2.
This can be confusing when comparing Q-Q plots using different statistics.
What to do about it?

@earosenthal
Copy link

Can you elaborate on what you mean by this? It looks like you are calculating lambda_GC using the Z-scores. What do you mean by 'other statistics'?

@privefl
Copy link
Owner Author

privefl commented Aug 26, 2021

I think the one usually reported in papers is the one for X2, right?

@earosenthal
Copy link

earosenthal commented Aug 30, 2021

I'm no expert, but it is my understanding that the inflation factor is based on the chi-square distribution (I think that is what you mean by X2). It looks like getLambdaGC may be calculating the square root of the inflation factor. Can you verify this? I calculated the inflation factor in my data using two ways (z-score, p-value) and compared it to what getLambdaGC output:

# using the z-scores
> chisq <-obj.gwas$score^2
> median(chisq)/qchisq(0.5,1)
[1] 0.9829162
# using the p-values 
> chisq <- qchisq(1-obj.gwas$p.value,1)
> median(chisq)/qchisq(0.5,1)
[1] 0.9806252
> bigsnpr:::getLambdaGC(obj.gwas)
[1] 0.9902582
> (bigsnpr:::getLambdaGC(obj.gwas))^2
[1] 0.9806112

@privefl
Copy link
Owner Author

privefl commented Aug 30, 2021

Yes, currently big_univLinReg() uses t-scores and big_univLogReg() uses Z-scores, so you need to square the lambda_GC.

This is also my understanding that it is usually reported for chi-squares (X2), therefore this question/issue.

@privefl
Copy link
Owner Author

privefl commented Feb 22, 2022

Also, maybe think about exporting the function to get the lambda_GC, which for now can be run using bigsnpr:::getLambdaGC().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants