Statalist The Stata Listserver


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

Re: st: CIs from survey commands


From   Richard Palmer-Jones <[email protected]>
To   [email protected]
Subject   Re: st: CIs from survey commands
Date   Thu, 26 Jan 2006 14:24:47 +0500

Thanks - sorry about the missing "no[1,1]" in my original di line
corrected below (but not correct of course see Jeff's reply)!


On 1/25/06, Jeff Pitblado, StataCorp LP <[email protected]> wrote:
> Richard Palmer-Jones <[email protected]> asks
>
> > How do I recover the CIs from svymean?
> > Using (for example)
> >
> > svymean s
> > mat no = e(_N)
> > di ci = _b[s] +/- invttail(no[1,1]-1,0.025)* _se[s]
> >
> > does not give exatly the same figures as reported by the output
>
> Richard has most of the formula correct, except for the degrees of freedom.
> -svymean- (and -svy: mean- in Stata 9) save the degrees of freedom in
> -e(df_r)-.  To reproduce the CIs reported by -svymean-, type
>
>         . svymean s
>         . di "95% lower limit = " _b[s] - invttail(e(df_r), 0.025) * _se[s]
>         . di "95% upper limit = " _b[s] + invttail(e(df_r), 0.025) * _se[s]
>
> --Jeff
> [email protected]
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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