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

scan1coef should give NA when coefficient can't be estimated #34

Open
kbroman opened this issue Feb 16, 2018 · 3 comments
Open

scan1coef should give NA when coefficient can't be estimated #34

kbroman opened this issue Feb 16, 2018 · 3 comments
Labels

Comments

@kbroman
Copy link
Member

kbroman commented Feb 16, 2018

If an allele or genotype is missing, its effect can't be estimated. But scan1coef() currently seems to just return crazy values rather than NAs.

@kbroman kbroman added the bug label Feb 16, 2018
@kbroman
Copy link
Member Author

kbroman commented Feb 21, 2018

The argument tol can be used to help with this. Increasing from the default 1e-12 to say 1e-4, many or most of the out-of-control estimates will become NA.

kbroman added a commit to kbroman/qtl2 that referenced this issue Feb 23, 2018
- "clean" seems potentially more informative than "threshold"

- In addition to setting small values to 0, we also look at the
  maximum probability in a genotype column; if that's not large we set
  all values in that column to 0.

- Related to Issue rqtl#34.
@kbroman
Copy link
Member Author

kbroman commented Feb 23, 2018

scan1coef() does give NA when a coefficient can't be estimated, or at least it tries to. But it can be hard when a column of genotype probabilities has values that are close to but not exactly 0. So I added clean_genoprob() which sets values below value_threshold to 0 and also looks at the maximum probability in a genotype column and if that's below column_threshold, we set all values in that column to 0.

@kbroman
Copy link
Member Author

kbroman commented Feb 27, 2018

Saunak suggests maybe using ridge regression, or including artificial individuals with mean phenotype, to deal with this problem.

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