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   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: Degrees of freedom formula for -svytab-
Date   Mon, 25 Oct 2004 13:25:23 -0400


It's been a while since I've mucked around under the hood with the -svy- commands (and with my -svr- commands). True enough.


At 05:23 PM 10/25/2004 +0100, you wrote:

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

Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government [email protected] e
308 White Hall w
Cornell University
Ithaca, NY 14853-4601

* For searches and help try:

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