Dear community:

I am having doubts about how Stata calculates standard errors and 95% confidence intervals for proportions, especially because I get different results from different versions of Stata. Here is my code example:

Code:
clear 
input x freq
0 47
1 53
end
expand freq
drop freq

proportion x
When I run the code above in Stata 13.1, I get a Std. Err. of .0501614 and a 95% Conf. Interval that goes from .4305964 to .6270792

When I run the same code in Stata 15.1, I get a Std. Err. of .0499099 and a 95% Conf. Interval that goes from .4310876 to .6266107

I have two questions:

1) Why are the standard errors different?

2) I have tried to "manually" calculate the 95% confidence intervals with the formula: CI(lower) = prop-(1.96*std. err.) ; CI(upper) = prop+(1.96*std. err.), but in both cases I don´t get the same results as those provided by Stata.

Am I doing anything wrong? Any advice and/or clarification is greatly appreciated.

Best regards,

Paolo Moncagatta