Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: BRR weights in Stata vs. SAS and Fay's adjustment?


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: BRR weights in Stata vs. SAS and Fay's adjustment?
Date   Fri, 22 Nov 2013 16:25:07 -0600

Lauren Rossen <[email protected]> wants to use BRR replicate weights with a Fay's
adjustment:

> I have a data set with BRR weights, which were calculated with a Fay's
> coefficient of 0.3.  I have 32 replicate weights, and I am trying to
> replicate a simple analysis done in SAS with the same data looking at mean
> caloric intake.  In SAS, the SEs do not change much when you specify a
> different Fay coefficient (either .3 or .7) - they range from 20.37 to
> 20.43.  Using Stata, however, the SEs vary wildly, and in some cases are
> nearly double what I get in SAS. 
> 
> Here is the code in Stata:
> 
> survwgt cr brr, strata(stra) psu(psu) weight(wt) stem(brr_) fay(.3) hadfile("...\brr_hadamardmatrixfile.ado")
> 
> svyset newpsu [pw=wt], strata(sdmvstra) brr(brr_*) vce(brr) fay(.3)
> 
> svy: mean kcal (gives SE of 20.47, close to what is obtained in SAS)
> 
> svyset newpsu [pw=wt], strata(sdmvstra) brr(brr_*) vce(brr) fay(.7)
> 
> svy: mean kcal (gives SE of 47.77, more than double what is obtained in SAS or with a different fay(#) in Stata)
> 
> 
> In the documentation, it seems it should be fay(1.7) [based on 2-0.3], but
> that produces the same as specifying it as fay(0.3).

Lauren is using Nick Winter's -survwgt- command to construct the replicate
weight variables.

	survwgt cr brr,		strata(stra)
				psu(psu)
				weight(wt)
				stem(brr_)
				fay(.3)
				hadfile("...\brr_hadamardmatrixfile.ado")

The resulting replicate weight variables are already adjusted when the -fay()-
option is specified.  The only thing left to do is inform Stata's -svyset-
that the specified -brr()- replicate weight variables are already adjusted by
specifying the -fay()- option.  The value specified in the -fay()- option
should be the same one used to generate the adjusted replicate weight
variables. Based on the call to -survwgt-, this would be

	 svyset psu [pw=wt],	strata(stra)
	 			brr(brr_*)
				vce(brr)
				fay(.3)

Lauren uses a different sampling unit and stratum variable in the -svyset-;
however, I will assume this is a typo.

It is not clear why Lauren used .7 in the second call to -svyset-.  I imagine
she meant to use 1.7, which would yield an equivelent variance multiplier
given that if 'f' is the specified Fay's adjustment, then the multiplier used
in the BRR variance estimation would be

		   1
		--------
		 (1-f)^2

In the PDF documentation this multiplier is documented in
'[SVY] variance estimation' on page 190 for Stata 13 (page 187 for Stata 12).

Note that .3 and 1.7 would yield an equivalent multiplier, but different
values in the replicate weight variables.

Lauren continued with a reference to an example at UCLA's website:

> I also saw on UCLA's site that fay(#)=1-1/sqrt(adjfay), [See
> http://www.ats.ucla.edu/stat/stata/faq/sample_survey_setups.htm] with adjfay
> set as either 0.3 or 1.7.  I'm confused.  What is the correct fay(#) to
> specify?  Why do the SEs differ so much in Stata, but only by a few decimal
> points in SAS?  

In Sudaan, 'adjfay' is the multiplier that corresponds with Fay's adjusted BRR
replicate weights.  That is to say

		            1
		adjfay = --------
		          (1-f)^2

So if we solve for 'f' we get

		f = 1 - 1/sqrt(adjfay)

Given a set of BRR replicate weight variables with a Fay's adjustment, SAS and
Stata agree on what needs to be specified to account for the Fay's adjustment,
Sudaan requires that the corresponding multiplier be specified instead.

--Jeff
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index