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: suest equivalent for areg.
From
"Gupta, Sumedha" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: suest equivalent for areg.
Date
Fri, 20 May 2011 16:34:04 +0000
Hi Jorge,
Thank you for your reply but I am running into exactly the problem you anticipated. Suest doesn't allow areg and xtreg and running ols with individual dummies is not an option with svy as that does not allow vce (cluster id).
Does anybody else have any thoughts on this please?
Many thanks.
Sumedha.
________________________________________
From: [email protected] [[email protected]] on behalf of Jorge Eduardo Pérez Pérez [[email protected]]
Sent: Wednesday, May 18, 2011 5:52 PM
To: [email protected]
Subject: Re: st: suest equivalent for areg.
As -xtreg- will not work with -suest- either, the only workaround that
comes to mind is to use ols with dummy variables. This might not be
computationaly feasible if you have too many individuals. See the code
below. It works with the caveat that -suest- requires the models to be
estimated with iweights and the constants obtained are different from
the -areg- case, but the coefficients on the independent variables are
the same.
I don't know if this approach produces correct standard errors due to
your survey data structure. Notice that suest does not allow the use
of -cluster- and -svy- at the same time. Maybe someone else on the
list can provide more information on this matter.
clear
set seed 20
set matsize 1000
webuse nlswork
keep if id<500
xtset idcode
gen w=uniform()
bys id: replace w=w[1]
xi i.occ i.ind i.id
areg age _Iocc* if south==1 [pweight=w], absorb (id) vce(cluster id)
areg age _Iind* if south==1 [pweight=w], absorb (id) vce(cluster id)
qui eststo R1: reg age _Iocc* _Iid* [iw=w] if south==1
unab a: _Iocc*
est tab, b se keep(`a' _cons)
qui eststo R2: reg age _Iind* _Iid* [iw=w] if south==1
unab b: _Iind*
est tab, b se keep (`b' _cons)
qui suest R1 R2, vce(cluster id)
est tab, b se keep(`a' `b' R1_mean:_cons R2_mean:_cons)
_______________________
Jorge Eduardo Pérez Pérez
On Wed, May 18, 2011 at 3:13 PM, Gupta, Sumedha <[email protected]> wrote:
> Dear All,
>
> I am trying to estimate a linear fixed effects model with survey data. Post estimation I want to use esttab to make my tables. I try the following code (sorry for not using the standard data code for this):
>
> . quietly eststo R1: xi: areg A B if subpop1==1 [pweight=wt], absorb (id) vce(cluster id)
>
> . quietly eststo R2: xi: areg A C if subpop1==1 [pweight=wt], absorb (id) vce(cluster id)
>
> . quietly suest R1 R2
>
> But then I get the following error message:
>
> areg is not supported by suest
> r(322);
>
> Can somebody please advise me on a way around this?
>
> Many thanks.
> Sumedha.
>
>
>
>
>
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/