Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

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


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Degrees of freedom formula for -svytab-
Date   Mon, 25 Oct 2004 17:23:25 +0100

At 16:54 25/10/2004, Nick Winter wrote:
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).
This is the case for -svymean-, -svyratio- and -svytotal- if the user specifies the -complete- option. However, if the user specifies the -available- option, then the number of PSUs can be different for different parameters, and therefore the degrees of freedom is a vector (with the same dimensions as the estimated parameter), and its value can be calculated from the estimation results by the command

matrix define dof = (e(_N_psu)-e(_N_str))'

I have just referred back to the -parmest- update in which I introduced the ability to handle vector degrees of freedom (dated 11 November 2002), and, according to my records, it was Nick Winter who told me this (in his email dated 6 November 2002). Thanks again to Nick for that.

Best wishes

Roger


--
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: [email protected]
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/




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