After doing CDF I received following values of P
(Sample of them)
[0.43 0.12 0.0021 0.05 0.017 0.001 0.025 0.038 0.35 0.29]
I want to combine my P
values with the help of Fisher method and get the output in the following way:
Select first 3 P
values and combines them and get result from this (using fisher method). For example, my first combine P
value would be : 0.43 ,0.12 0.0021
and my next P
combine value would be 0.12, 0.0021 ,0.05
and so on.
Can anyone tell me how we can apply Fisher method using MATLAB for this problem?
I wasn't able to find any solution using MATLAB.
Fisher's method combines extreme value probabilities from each test, commonly known as "p-values", into one test statistic (X2) using the formula :
documents tells about fisher method and I marked in circle the formula which can be used for combining the p value via using fisher method please have a look :)
where pi is the p-value for the ith hypothesis test. When the p-values tend to be small, the test statistic X2 will be large, which suggests that the null hypotheses are not true for every test.
I don't think there is a Fisher's combined probability test built in MATLAB, but it shouldn't be hard to implement it:
first we will make a helper matrix that sum the elements in P as we want:
if we run
P*summer
, we get:Next, we compute the statistic by first taking the ln of all
P
and than sum them in 3's (and multiply by-2
):the result:
Finally we compute the p-values from a chi-square distribution with
2*3 = 6
df:And we get: