Questions tagged [bonferroni]

Bonferroni is a commonly applied statistical technique to counteract the multiple comparison problem. It is the simplest and conservative method to reduce the instance of a false positive, as it ignores potentially valuable information, such as the distribution of p-values across all comparisons.

45 questions
41
votes
7 answers

Why can't I get a p-value smaller than 2.2e-16?

I've found this issue with t-tests and chi-squared in R but I assume this issue applies generally to other tests. If I do: a <- 1:10 b <- 100:110 t.test(a,b) I get: t = -64.6472, df = 18.998, p-value < 2.2e-16. I know from the comments that…
arandomlypickedname
  • 1,349
  • 1
  • 11
  • 12
8
votes
6 answers

Adjust p-values for multiple comparisons in Matlab

I have a cell array of p-values that have to be adjusted for multiple comparisons. How can I do that in Matlab? I can't find a built-in function. In R I would do: data.pValue_adjusted = p.adjust(data.pValue, method='bonferroni') Is there a similiar…
Martin Preusse
  • 9,151
  • 12
  • 48
  • 80
3
votes
1 answer

Table including between-group p value comparison for 3+ groups using ANOVA

Firstly - love gtsummary! It's revolutionised how I do stats for all my papers and made me dive fully into R. Wondering if there is a way to do between-group comparisons using ANOVA with gtsummary? Here's an example: enter image description here We…
3
votes
1 answer

Bonferroni Simultaneous Confidence Intervals of differences in means

I am trying to obtain Bonferroni simultaneous confidence intervals in R. I have the following data set that I made up for practice: df2 <- read.table(textConnection( 'group value 1 25 2 36 3 42 4 50 1 27 2 35 3 49 4 57 1 22 2…
Remy M
  • 599
  • 1
  • 4
  • 17
2
votes
0 answers

Which is the better way of getting significantly correlated features with respect to outcome variable?

I have a dataset with 2112 features and 2337 entries. I am trying to see the correlation between these features and the dependent variable. All of the features and the outcome variable are numeric. The features have been standard scaled. I am trying…
Echo
  • 570
  • 1
  • 7
  • 21
2
votes
1 answer

LSD value is null when using Bonferroni's procedure in R

I have a problem in finding the value of LSD when using the Bonferroni's procedure. It returns NULL and could you please help me with it? Thanks so much. library(agricolae) # Input the treatments and responses trt <- c(rep("P", 4), rep("T", 4),…
Fox_Summer
  • 149
  • 6
1
vote
2 answers

How to run a linear regression in R with custom significance level

I'm trying to run a 12 linear regression and want to correct for multiple testing problems. The significance level in my field is usually p = 0.05 With the Bonferroni correction it would be p = 0.05 / 12 = 0.0041 If I run the regression as fit <-…
1
vote
0 answers

Controlling for multiple comparison

I have quick question. I am performing a study involving 4 treatments + control. I want to know if and which treatments differ significantly from each other on an outcome variable. My ANOVA is significant and I now want to conduct a post-hoc test to…
Nicolas N.
  • 11
  • 1
1
vote
0 answers

FDR and Bonferroni corrections. Alternative calculation methods?

I have two questions: First: I was just wondering if there is another way to calculate FDR (or other pvalue correction methods) besides using statsmodels.stats.multitest.multipletests? Especially I am looking for FDR as stand alone (for example NOT…
Mstaff
  • 23
  • 2
1
vote
0 answers

Tidyr: Paired t-test using a Bonferroni Correction using the pairwise_t_test() Function: Incorrect P-Value and Adjusted P-Value Outputs in R

Issue: During my analysis, I am having problems conducting a pairwise t-test (probably because I am a newbie to coding these types of statistical tests). I have nine parameters that are measurements of whistle types from dolphin species. I want to…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
1
vote
1 answer

Grouped ggplot for adding p-values

I'm trying to print the bonferroni p values on top of every grouped bar plot. The code that I'm using is: stat1 <- stack[1:170,] %>% rstatix::group_by(modules) %>% rstatix::t_test(values ~ phenotypes) %>% rstatix::adjust_pvalue(p.col = "p", method =…
driver
  • 273
  • 1
  • 13
1
vote
0 answers

matrixEQTL R-too many associations

I have used matrixEQTL R package using 1,002,800 SNPs, 29,000 genes and a Bonferroni correction of p-value 1.4e-12. I have 400 samples and used the first five principal components as covariates. It has given 1148000 cis associations and 73136000…
1
vote
1 answer

Adding holm correction to FWER graph

I asked this question on cross-validate, but was asked to move it here because it involved coding more than a statistics question. I'm teaching a statistics class about family-wise error rate, and have created a graph to illustrate how, when we…
Andy
  • 413
  • 2
  • 15
1
vote
0 answers

R: P value correcting for multiple testing in a function - table1

I am doing descriptive statistics using table1 with an added p value column, using the data and methods described here: https://cran.r-project.org/web/packages/table1/vignettes/table1-examples.html#example-a-column-of-p-values I am using the…
1
vote
1 answer

Plotting adjusted Bonferroni values on a ggplot

I would like to use Bonferroni-adjusted p-values in a ggplot showing comparison bars, but I can't seem to figure it out. If I use t.test method... ggplot(iris, aes(x = Species, y = Sepal.Length)) + geom_boxplot() + # using `ggsignif` to display…
datakritter
  • 590
  • 5
  • 19
1
2 3