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

Error M0 > 0 are not all TRUE #6

Open
kdkorthauer opened this issue May 29, 2018 · 0 comments
Open

Error M0 > 0 are not all TRUE #6

kdkorthauer opened this issue May 29, 2018 · 0 comments

Comments

@kdkorthauer
Copy link
Contributor

Hi,

I am running into the error M0 > 0 are not all TRUE using nulltype = "empirical" with the additional warning Warning message: In sqrt(-1/{ : NaNs produced. Looks like this is thrown from the following line of the efron() function:

sig = as.numeric(sqrt(-1/{ 2 * b0[3] }))

I’m not sure what this line is doing, or why it expects that b0[3] is negative, so I'm not sure how to fix.

Here’s a toy reproducible example where it occurs - when the test statistics look a bit bimodal (but I’m not sure if this is the only type of scenario):

set.seed(57)
res <- FDRreg::FDRreg(c(rnorm(500,1,0.8), rnorm(500,-1,0.8)), 
               features = model.matrix( ~  splines::bs(rnorm(1000), df = 3) - 1),
               nulltype = 'empirical’)

Please let me know if this can be resolved. Thanks!

Best,
Keegan

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