-
Notifications
You must be signed in to change notification settings - Fork 7
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
method for missing? #108
Comments
Thinking about it some more, maybe something like a |
Here is how I handled the situation in my own code. I don't know if it would merit adding to your package:
|
Thanks for bringing up the handling of missing values. Your approach looks good to me, not sure if there is a more elegant way of removing and reinserting missing values exists. It is definitely worth exploring if missing values should better be handled by the |
@pdimens Just to understand your case a bit better: How did you generate the original p-values and why are some values missing? |
That's a pretty fair question. The p-values were generated with a chi-squared test. When performed on all the data, it works ok, but if the data is partitioned by group, some groups have a particular locus (genetics work) entirely missing, which I also didn't realize would have happened. The actual code is here: https://github.com/pdimens/PopGen.jl/blob/master/src/HardyWeinberg.jl if the specific implementation matters. |
Okay, thanks for the details - that is interesting to see. |
Having learned quite a bit since opening this issue, the PR submitted performs this a lot more elegantly than the code suggested above. |
Is there a simple(ish?) method to perform the correction but skip
missing
values, and output the corrected array withmissing
respecting their original indices (but not used in the calculations)?Reading that back to myself, it doesn't feel like it's worded too clearly, so maybe an example:
The text was updated successfully, but these errors were encountered: