我将根据 R 中包含的数据集“CES11”数据集确定比例的置信区间。我用于测试的变量是 Abortion,值是“No”和“Yes”。我想找到“是”比例的置信区间,但 R 做了一个假设检验,并为第一级“否”提供了一个置信区间。如何更改它以使结果对应于等于“是”的级别?
Frequency counts (test is for first level):
abortion
No Yes
1818 413
1-sample proportions test without continuity correction
data: rbind(.Table), null probability 0.5
X-squared = 884.82, df = 1, p-value < 2.2e-16
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
0.7982282 0.8304517
sample estimates:
p
0.8148812