I have a trimodal null distribution that looks like this:
In order to calculate the significance we just check how extreme the values are respect to our null distribution.
We do it this way:
find.pvalue <- function(value, null.dist, length(null.dist)) {
if (value<0) {
p = (sum(null.dist < value)+1)/length(null.dist)
} else {
p = (sum(null.dist > value)+1)/length(null.dist)
}
return(p)
}
Then adjust FDR.
This is how I would do it for a normal distribution, but is this correct way to test for extreme values for a null distribution like this one?
Thanks