Open
Conversation
bvenn
requested changes
Jan 28, 2022
|
|
||
|
|
||
| // adapted from: https://en.wikipedia.org/wiki/%C5%A0id%C3%A1k_correction & https://personal.utdallas.edu/~herve/Abdi-Bonferroni2007-pretty.pdf | ||
| // Old: /// Computes the Dunn-Šidák correction onto a collection of p-values with a given alpha. Returns a list of booleans which state if the p-value should be rejected or not, and the new critical value for this alpha. |
|
|
||
| // adapted from: https://en.wikipedia.org/wiki/%C5%A0id%C3%A1k_correction & https://personal.utdallas.edu/~herve/Abdi-Bonferroni2007-pretty.pdf | ||
| // Old: /// Computes the Dunn-Šidák correction onto a collection of p-values with a given alpha. Returns a list of booleans which state if the p-value should be rejected or not, and the new critical value for this alpha. | ||
| /// Computes the Dunn-Šidák correction onto a collection of p-values with a given alpha. Returns a critical value. p-values above the critical value should be rejected. |
Member
There was a problem hiding this comment.
Try to not use special characters in fs or fsx files. Describe what this method correct for? (FWER?)
| let dunnSidak alpha (pValues : seq<float>) = | ||
| let m = float (Seq.length pValues) | ||
| let criticalValue = 1. - (1. - alpha) ** (1. / m) | ||
| // List.map (fun p -> if p > criticalValue then true, p else false, p) (List.ofSeq pValues), |
Member
There was a problem hiding this comment.
- remove this line
- What is the default procedure if pvalues in the input sequence are nan? Are they excluded from determining m? Should there be a special case? I don't know, but i can think of reasons why to exclude nan tests and maybe it is commonly performed.
Member
Author
There was a problem hiding this comment.
I did not find any case like this for this test. So I suggest to just exclude them. Same goes for values > 1 and < 0.
tests/FSharp.Stats.Tests/Testing.fs
Outdated
|
|
||
| [<Tests>] | ||
| let dunnSidakTest = | ||
| // taken from: https://www.real-statistics.com/hypothesis-testing/familywise-error/bonferroni-and-dunn-sidak-tests/ |
Member
There was a problem hiding this comment.
The link is broken. Please provide references to papers, R, SPSS packages or similar sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please reference the issue(s) this PR is related to
Closes #178
Please list the changes introduced in this PR
Description
Dunn-Šidák correction can now be found under
MultipleTestingmodule. Unit tests are implemented as well.