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

Why computing the R2 between the trait and the PRS is different from PRSIce results? #324

Open
Antonio-Nappi opened this issue Jun 14, 2023 · 5 comments

Comments

@Antonio-Nappi
Copy link

Antonio-Nappi commented Jun 14, 2023

I don't understand why, when I compute the R2 value between my trait and the PRS obtained with PRSice the result is very different from the one reported by PRSice, e.g. I obtain a value of -0.47 while PRSice, in its summary file, reports a PRS.R2 of 0.075. I report here also the plots generated by PRSice. The plots looks strange, how should I interpret them?

prsice_results_BARPLOT_2023-06-13
prsice_results_HIGH-RES_PLOT_2023-06-13
prsice_results_QUANTILES_PLOT_2023-06-13

@choishingwan
Copy link
Owner

choishingwan commented Jun 14, 2023 via email

@Antonio-Nappi
Copy link
Author

Antonio-Nappi commented Jun 14, 2023

I am using the r2_score function from scikit-learn and according to the documentation Best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). In the general case when the true y is non-constant, a constant model that always predicts the average y would get a score of 0.0.. What about the plots that I posted? The high resolution plot is weird, isn't it?

@choishingwan
Copy link
Owner

all your p-value is 0, which can lead to the high-resolution plot (which operates on -log10 p) to look abnormal. As for the R2, the way we calculated it was 1 - (1 - full model R2) / (1 - null model R2). I am not sure how you implemented your python script and I'd guess there's some error in how you used the r2_score function that might have lead to this drastic difference in results.

@Antonio-Nappi
Copy link
Author

Hey, I got the error with the R2, now it's fine. for the pvalue that are all 0, do you think that it's an error? The trait that I am studying is BMI

@choishingwan
Copy link
Owner

It is possible for BMI to have p-value of 0 as the GWAS is powerful, though I will also try and look out for sample overlap, which can sometimes lead to inflation in test statistics.

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

No branches or pull requests

2 participants