Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Different confidence intervals from proportions and tabulates (also in survey)

From   "Jason Ferris" <>
To   <>
Subject   RE: st: Different confidence intervals from proportions and tabulates (also in survey)
Date   Mon, 30 Oct 2006 10:23:20 +1100

Dear Jeff and Nick,
Thanks for your replies.  I did not attach my dataset; although I could
attach the output of the -svy: prop and -svy: tab if you want.  I
thought the easy access example would provide enough for you to tell my
why there is a difference.  And you have (thanks again).

My concern was exporting the matrix to excel and the resulting 1.96*e(V)
was giving me the CI's equivalent to the -svy: proportion (which in my
case was giving me negative CI's).  After reading both your responses I
will transform the data to the logit and keep everything nicely position
between 0 and 1.  Hopefully, in this manner the mat2txt command or
parmest will work nicely for me - and save me a lot of manual entry.


-----Original Message-----
[] On Behalf Of Jeff
Pitblado, StataCorp LP
Sent: Monday, 30 October 2006 9:52 AM
Subject: Re: st: Different confidence intervals from proportions and
tabulates (also in survey)

Jason Ferris <> is concerned that the confidence
intervals from -svy: proportion- are different from -svy: tabulate- even
though the point estimates and standard errors are the same:

> Hi. I have been running survey proportions and observing results with
> negative confidence intervals (which doesn't make sense).  When I use
> survey tab (with column percent, se and ci) I get the same point
> estimates and standard errors but different 95% confidence intervals.
> assume this is an issue with the proportion calculations using
> Wald" for confidence intervals.
> I checked the survey manual and have not been able to find why:
> Paste the following command to see my dilemma:
> webuse nhanes2b, clear
> svy: proportion race
> svy: tab race, ci se
> The results show the same point estimates and standard errors (with
> rounding) but different CI's.  As mentioned, for my data, I get some
> negative CI's for svy: proportions commands but not for the svy:
> tabulate commands. My ultimate concern is being able to automatically
> extract the CORRECT estimates to excel (from using matrix e(b) and
> - and calculating 95% CI from square-root of e(V) *1.96).
> I am using the latest version of Stata 9.2, on Windows XP.

While -svy: proportion- uses the normal approximation formulas for
limits, e.g.

	phat +/- sehat*t_critical_value

the -svy: tabulate- command uses a logit transform.  The benefit of
using the
logit transform is that the confidence limits are guaranteed to stay
the parameter space for a proportion, i.e. [0,1].

The formulas for the logit transformed confidence limits used by
-svy: tabulate- are documented in the 'Methods and formulas' section of
'[SVY] svy: tabulate twoway'.

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index