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_setdata(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?
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_setdata(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