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

scale of MCMC sampling of beta #499

Closed
yidingdd opened this issue May 23, 2024 · 3 comments
Closed

scale of MCMC sampling of beta #499

yidingdd opened this issue May 23, 2024 · 3 comments

Comments

@yidingdd
Copy link

yidingdd commented May 23, 2024

Hi Florian,

Could you help to confirm the scale of betas from the MCMC sampling in your newest bigsnpr release?

It looks like the beta sample returned by snp_ldpred2_grid is on allelic scale, but the beta sample returned by snp_ldpred2_auto is on standardized scale, is it correct?

sweep(beta_gibbs, 1, scale, '*')

#' - `$sample_beta`: sparse matrix of sampling betas (see parameter `report_step`),

Best,
Yi

@privefl
Copy link
Owner

privefl commented May 24, 2024

Hi Yi,

For LDpred2-auto,

  • $beta_est is also on allelic scale
  • but $sample_beta is indeed on the standardized scale. You can probably use Matrix::Diagonal(x = scale) %*% auto$sample_beta to transform it to the allelic scale, where scale <- with(df_beta, sqrt(n_eff * beta_se^2 + beta^2)).

@yidingdd
Copy link
Author

Hi Florian,

Thank you for confirming LDpred2-auto, for ldpred2-grid, do we need to use the same rescaling?

Best,
Yi

@privefl
Copy link
Owner

privefl commented May 24, 2024

No, the output is already on the allelic scale for LDpred2-grid.

@privefl privefl closed this as completed Aug 2, 2024
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