我有一个二项式检验的结果,看起来像这样:
data: x and n
number of successes = 0, number of trials = 7, p-value = 0.01563
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.0000000 0.4096164
sample estimates:
probability of success
0
我想知道如何在R中仅提取p值。我尝试使用grep和pmatch,但它们似乎需要一个表格或向量。
binom.test(x,n)
产生的。可以使用binom.test(x,n)$p.value
从此输出中访问 p 值。 - RHertel