-
Notifications
You must be signed in to change notification settings - Fork 2
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
p-value output now matched aldex.glm #1
Conversation
Wonderful, thank you! Could you please write a very minimial unit test for this? It would be great if it didn't depend on ALDEx2 but was just a calculation of the p-values based on a hand-coded calculation. This would help ensure future changes don't break things without relying on ALDEx2. |
I could hard code the p-values or only put aldex2 under Suggests in the Namespace file, which I think(?) means it won't be downloaded by default. |
hard-code please. Suggests stuff is ok when necessary but can be a pain.
Justin
|
Ok, test added |
Sorry I was just thinking, we probably want to add BH correction into this as well as it would be impossible to do after the summary p-values are calculated right? i.e., its not something the user could easily do, it needs to be done in the function. If so, could you add? |
There is already an option to pass a p.adjust.method="BH" to the function and the function now returns corrected p-values and uncorrected p-values. |
p.adj.res <- rbind(p.adj.res, apply(tmp_mat, 1, min)) | ||
} | ||
|
||
return(list(estimate=out$estimate, std.error=out$std.error, p.val=p.res, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted p-values returned here @jsilve24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you.
This code should show that the ALDEx3 and ALDEx2 glm methods produce roughly the same output
TODO: Add tests, probably somehow make below code into the unit test, add more tests for p-values at each step.
Example: