[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Degrees of freedom formula for -svytab-
It looks to me like the -svy- commands do, in fact, return the df in e(df_r).
This df is, in fact, e(N_psu) - e(N_strata). But you can just grab e(df_r).
At 03:24 PM 10/25/2004 +0100, you wrote:
Fellow Statalisters (especially StataCorp):
I have a query about the degrees of freedom used to calculate the
confidence intervals for the probabilities/percentages in -svytab-. The
confidence interval formula is given near the bottom of Page 85 of
-[SVY]-, and includes a symbol, which would be $\nu$ in TeX, for the
degrees of freedom of a t-distribution. Near the top of Page 88, $\nu$ is
defined as being equal to the number of PSUs minus the number of strata.
This seems to imply that, if we use the Stata estimation results for
-svytab-, then the degrees of freedom can be calculated by typing
This formula appears to work in at least one example that I have tried in
the -auto- data, where I have re-created the confidence intervals produced
using the -ci- option of -svytab-. Is this formula always used by -svytab-
to calculate confidence intervals?
More generally, are there any other estimation commands (apart from
-svytab-, -svymean-, -svyratio- and -svytotal-) which calculate confidence
intervals using a t-distribution with degrees of freedom other than those
stored in -e(df_r)-? I ask because I am planning to update my -parmest-
package (downloadable from SSC) so that the -dof- variable in the
resultsset will contain the correct degrees of freedom after the -svytab-
command, and would like to know if I should do the same for any other
estimation commands. (For more information on -parmest-, see the on-line
help for -parmest-, and also Newson (2003) and Newson (2004).) I am aware
that -ttest- uses the Satterthwaite or Welch degrees of freedom if the
-unequal- option is specified, but -ttest- is not an estimation command,
and therefore cannot be used with -parmest-.
I would like to thank Jill Starkes and Lee Sieswerda of Thunder Bay
District Health Unit for drawing my attention to the non-standard
confidence interval formula used by -svytab-.
Best wishes (and thanks in advance)
Newson, R. 2003. Confidence intervals and p-values for delivery to the end
user. The Stata
Journal 3(3): 245-269. Also downloadable from Roger Newson's website at
Newson, R. 2004. From datasets to resultssets in Stata. Presented at the
10th United Kingdom
Stata Users' Group Meeting, London, 29 June, 2004. Also downloadable from
website at http://www.kcl-phs.org.uk/rogernewson.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try:
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government email@example.com e
308 White Hall falcon.arts.cornell.edu/nw53 w
Ithaca, NY 14853-4601
* For searches and help try: