[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: CIs from survey commands
Richard Palmer-Jones <email@example.com> asks
> How do I recover the CIs from svymean?
> Using (for example)
> svymean s
> mat no = e(_N)
> di ci = _b[s] +/- invttail(-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]
* For searches and help try: