I am going to determine the confidence interval for the proportion based on dataset "CES11" dataset which is included in R. The variable that I have used for the test is Abortion and the values are "No" and "Yes". I want to find the confidence interval for the proportion of "Yes", but R does a hypothesis test and provides a confidence interval for the first level which is "No". How can I change it such that results corresponds to level equal to "Yes"?
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