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

Division by zero in mash_set_data with df matrix after applying p2z #133

Open
dorolin opened this issue Nov 6, 2024 · 0 comments
Open

Comments

@dorolin
Copy link

dorolin commented Nov 6, 2024

Hello,
I'm trying to read my data with the mash_set_data function. This works fine when only submitting Bhat and Shat matrices. As soon as I provide a df matrix as well, I'm getting the following error: "Error in mashr::mash_set_data(Bhat = , Shat = , df = ) :
Missing data pattern is inconsistent between Bhat and Shat
". I verified that all three matrices have missing data at the same positions. After tracking this down, I found that the issue comes from Shat = Bhat / p2z(2 * pt(-abs(Bhat/Shat), df), Bhat): the p2z function returns some zeros in the output matrix, which then leads to a few extra NaN in Shat. At these positions, also my Bhat matrix contains zeros. What do you suggest to fix this issue?

Many thanks,
Doro

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

1 participant