Need help writing a R code that implement Benjamini-Hochberg procedure to control false discovery rate without using package.
Question:
Given the data below write R code that implement Benjamini-Hochberg procedure to control false discovery rate without using package.
Dietary variable
| P value |
Total calories |
<0.001 |
Olive oil |
0.008 |
Whole milk |
0.039 |
White meat |
0.041 |
Proteins |
0.042 |
Nuts |
0.06 |
Cereals and pasta |
0.074 |
White fish |
0.205 |
Butter |
0.212 |
Vegetables |
0.216 |
Skimmed milk |
0.222 |
Red meat |
0.251 |
Fruit |
0.269 |
Eggs |
0.275 |
Blue fish |
0.34 |
Legumes |
0.341 |
Carbohydrates |
0.384 |
Potatoes |
0.569 |
Bread |
0.594 |
Fats |
0.696 |
Sweets |
0.762 |
Dairy products |
0.94 |
Semi-skimmed milk |
0.942 |
Total meat |
0.975 |
Processed meat |
0.986
|