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

From |
Nick Winter <nw53@cornell.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Degrees of freedom formula for -svytab- |

Date |
Mon, 25 Oct 2004 11:54:47 -0400 |

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). --Nick Winter 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

scalar df=e(N_psu)-e(N_strata)

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)

Roger

References

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

http://www.kcl-phs.org.uk/rogernewson.

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 Roger Newson's

website at http://www.kcl-phs.org.uk/rogernewson.

--

Roger Newson

Lecturer in Medical Statistics

Department of Public Health Sciences

King's College London

5th Floor, Capital House

42 Weston Street

London SE1 3QD

United Kingdom

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

Email: roger.newson@kcl.ac.uk

Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*

* 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/

Nicholas Winter 607.255.8819 t

Assistant Professor 607.255.4530 f

Department of Government nw53@cornell.edu e

308 White Hall falcon.arts.cornell.edu/nw53 w

Cornell University

Ithaca, NY 14853-4601

*

* 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/

**Follow-Ups**:**Re: st: Degrees of freedom formula for -svytab-***From:*Roger Newson <roger.newson@kcl.ac.uk>

**References**:**st: Degrees of freedom formula for -svytab-***From:*Roger Newson <roger.newson@kcl.ac.uk>

- Prev by Date:
**st: Degrees of freedom formula for -svytab-** - Next by Date:
**Re: st: Degrees of freedom formula for -svytab-** - Previous by thread:
**st: Degrees of freedom formula for -svytab-** - Next by thread:
**Re: st: Degrees of freedom formula for -svytab-** - Index(es):

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