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

scan1() with model="binary" giving lots of NAs #55

Open
kbroman opened this issue May 11, 2018 · 3 comments
Open

scan1() with model="binary" giving lots of NAs #55

kbroman opened this issue May 11, 2018 · 3 comments
Labels

Comments

@kbroman
Copy link
Member

kbroman commented May 11, 2018

scan() with model="binary" is giving lots of NA results for the LOD scores (at least in the case of DO mouse data)...much more than I would have expected. Here's an example plot for one chromosome; note the gaps.

scan1_binary_problem

@kbroman kbroman added the bug label May 11, 2018
@kbroman
Copy link
Member Author

kbroman commented Jun 8, 2018

This happens whenever one of the coefficient's estimates goes to +/- infinity. glm() gives the warming "glm.fit: fitted probabilities numerically 0 or 1 occurred". But I should at least be able to get LOD scores if not coefficient estimates.

kbroman added a commit to kbroman/qtl2 that referenced this issue Jul 20, 2018
@kbroman
Copy link
Member Author

kbroman commented Jul 20, 2018

Rather simplistic solution: don't allow the "linear predictor" to be too large. If > 100 (< -100), set to 100 (or -100).

@kbroman kbroman closed this as completed Jul 20, 2018
kbroman added a commit that referenced this issue Jul 20, 2018
Fix problem with NAs in binary trait regression (Issue #55)
@kbroman kbroman reopened this Jul 20, 2018
@kbroman
Copy link
Member Author

kbroman commented Jul 20, 2018

Still having a few problems (with Attie DO data using coat color), though clearly much less than before.

Posted some data and code in a gist.

  • fit1() gives NA for the LOD score; in other cases I was getting negative LOD scores.
  • glm() doesn't converge within 25 iterations (the default), and if we increase the number of iterations, it gives a log likelihood that is less than that for the null hypothesis (with just an intercept).
  • My crude R function goes to -Inf for the log likelihood after 15 iterations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant