Skip to content

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

@dorolin

Description

@dorolin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions