P-value correction: Difference between revisions
Content added Content deleted
(added that the C function can calculate using multiple methods) |
m (merged 1 function into the main function p_adjust in C) |
||
Line 17: | Line 17: | ||
There are numerous implementations of how to do this, namely Benjamini-Hochberg, Holm, Hochberg, Hommel, Bonferroni. Each of which has its own advantages and disadvantages. This work is a translation of the R source code. In order to confirm that the new function is working correctly, each value is compared to R's output and a cumulative absolute error is returned. |
There are numerous implementations of how to do this, namely Benjamini-Hochberg, Holm, Hochberg, Hommel, Bonferroni. Each of which has its own advantages and disadvantages. This work is a translation of the R source code. In order to confirm that the new function is working correctly, each value is compared to R's output and a cumulative absolute error is returned. |
||
The C function is designed to work as similarly to the R function as possible, and is able to do any one of the methods. |
The C function `p_adjust` is designed to work as similarly to the R function as possible, and is able to do any one of the methods. |
||
=={{header|C}}== |
=={{header|C}}== |
||
Line 225: | Line 225: | ||
} |
} |
||
return doubleArray; |
return doubleArray; |
||
⚫ | |||
unsigned short int string2FDRtype (const char *restrict STRING) { |
|||
//this functionshould be separate from p_adjust because this function will be |
|||
//called in multiple places |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
} |
} |
||
Line 282: | Line 258: | ||
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
||
} |
} |
||
short int TYPE = -1; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
//--------------------------------------------------------------------------- |
//--------------------------------------------------------------------------- |
||
//--------------------------------------------------------------------------- |
//--------------------------------------------------------------------------- |