Statalist The Stata Listserver


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

Re: st: svy commands for random effects model


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: svy commands for random effects model
Date   Mon, 20 Nov 2006 15:06:11 -0600

Robert Bozick <[email protected]> wants to fit a random effects model using
survey data:

> I am working on an analysis that will require the use of a random effects
> model on a data set that includes two observations per individual.   The
> general form of the code I am using to estimate the model is:
> 
> xtreg y x1 x2 x3, re i(id)
> 
> (id = the case id for each individual)
> 
> The sample uses a stratified cluster design and I therefore have to use the
> svy commands when analyzing this data set.
> 
> I am using Stata 8.0 and could not find any documentation on the application
> of svy commands with estimating a random effects model.
> 
> Is there a svy command or some other procedure available so that I can
> obtain the correct standard errors for this model?

There are no estimation commands (in Stata 9 or earlier) that will fit a
random effects model using the linearized variance estimator for survey data.

If Robert were using Stata 9 and was willing to use -xtreg, mle- to fit the RE
model, he could use the -svy jackknife- prefix command to get design-based
variance estimates via the jackknife.

	NOTE:  The -xtreg, re- command does not accept weights, but
	-xtreg, mle- allows -iweight-s.

If Roberts survey design variables were named swgt (sampling weight), strid
(strata id variable), and psuid (PSU id variable), he would type

	. svyset psuid [iw=swgt], strata(strid)
	. svy jackknife _b: xtreg y x1 x2 x3, mle i(id)

I'm assuming that -id- is nested within -psuid- (panels are nested within the
PSUs).

--Jeff
[email protected]
*
*   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