Home > Enterprise >  R brunnermunzel.test confidence interval vs p-value
R brunnermunzel.test confidence interval vs p-value

Time:10-10

I am using the R function brunnermunzel.test (library(brunnermunzel)) and it's giving me a pvalue >0.05 but the 95% CI do not include 0. I am interested in testing the mean outcome by treatment group.

Dummy dataset:

set.seed(123)

df2 <- data.frame(treatment=rep(c(0, 1), each=n), value = sample(-5:10,100, replace = TRUE))

brunnermunzel.test(value ~ treatment, dat = df2)

I get a pvalue = 0.9482 and a 95% CI (0.3804636; 0.6119364).

How is it possible for the p value to be this high but the 95% CI excludes 0?

CodePudding user response:

The null hypothesis of the Brunner Munzel Test is that the two distributions are stochastically equal. This should be the case here, because they are just randomly drawn from the same distribution using sample.

Indeed, the null hypothesis was not rejected (p > 0.05). The estimate is 0.5 if the null hypthesis is true. It was estimated from 0.38 to 0.61. Thus, both p value and CI reflect the null hypothesis.

  •  Tags:  
  • r
  • Related