I am trying to adjust my raw p-values using the Bonferroni method. However, all the adjusted p-values show values of 1. I don't expect this. I have run this function many a times previously. I also tried it with other set of p-values, but only in this set, it shows values of 1. In addition, I checked manually as well as with an excel tool, where it works perfectly fine in this set. But not sure why the p.adjust function does not give the right output.
> bonf_p_value <- p.adjust(results1$p_value, method="bonferroni", n = length(results1$p_value))
> bonf_p_value
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[59] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[117] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[175] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[233] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
I also here paste the output of the first 30 raw p-values:
> results1$p_value [1:30]
[1] 1.11718083532422e-07 1.51230033705852e-22 0.0306424108597955 0.145414146079963 0.190655506480756
[6] 4.1978959530709e-10 2.94936466785171e-22 0.0430124258812526 0.000370518232611833 0.0552390731601288
[11] 2.00227050966185e-10 1.13669513384145e-07 1.67714177934414e-10 0.00280377485899087 1.34668243167121e-16
[16] 0.129035611905561 0.000174054291588747 3.68035394001236e-10 9.02747138351362e-24 6.24974784951431e-06
[21] 2.88869180470667e-05 5.46785702671633e-11 0.00177979879670995 3.93003744169092e-18 1.17992044937425e-65
[26] 3.89268583374799e-42 0.00113708261328755 0.744722392060977 8.85123774661934e-42 5.27920045337181e-22
560 Levels: 0.000114741095154172 0.000174054291588747 0.000205370871640424 0.000219014679077748 ... 9.84472710150517e-05
and this is the length of "p_value" column:
> length(results1$p_value)
[1] 274
Would anyone know what could be the reason p.adjust is not calculating it right, and what do I need to do, to do it the right way?