Statalist


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

RE: st: instrumental variables with xtpcse


From   "Skidmore, Mark" <[email protected]>
To   <[email protected]>, <[email protected]>
Subject   RE: st: instrumental variables with xtpcse
Date   Tue, 4 Sep 2007 08:12:50 -0400

Thanks Nicola.  I will look into xtgee.

FYI:  I think the following code produces correct standard errors for
two-stage regression using xtpcse:

Mark


.xtpcse lmantifvalue cityshare lnpop effectivefullvaluerate
residential_share year3-year14, correlation(ar1) pairwise

.predict lnmantifvalhat if e(sample), xb
.summarize lnmantifvalhat

.xtpcse lmanvalue lnmantifvalhat lnpop effectivefullvaluerate
residential_share year3-year14, correlation(ar1) pairwise

.rename lnmantifvalhat lnmantifvalhold
.rename lmantifvalue lnmantifvalhat

.predict value if e(sample), xb
.gen residual=lmanvalue-value
.summarize residual

.rename lnmantifvalhat lmantifvalue
.rename lnmantifvalhold lnmantifvalhat
.gen residualsq=residual^2
.summarize residualsq

.scalar realmse = r(mean)*r(N)/(7391-18)
.matrix bmatrix = e(b)
.matrix Vmatrix = e(V)
.matrix Vmatrix = e(V)*realmse/e(rmse)^2
.ereturn post bmatrix Vmatrix, noclear 
.ereturn display


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Saturday, September 01, 2007 5:53 AM
To: [email protected]
Cc: Skidmore, Mark
Subject: Re: st: instrumental variables with xtpcse

My second-best suggestion is to move to -xtgee-
Nicola

At 02.33 29/08/2007 -0400, "Skidmore, Mark" wrote:
>I have estimated a two-stage regression using the following commands:
>
>. xtpcse lntifvalue cityshare lnpop effectivefullvaluerate
residential_share year5-year17, correlation(ar1) pairwise
>. predict xb
>. xtpcse lnvalueexcludingtif xb lnpop effectivefullvaluerate
residential_share year5-year17, correlation(ar1) pairwise
>
>However, the standard errors in this two-step procedure are incorrect.
I thought I might be able to obtain the correct standard errors using
the VCE bootstrapping option.  While the VCE option is available for the
xtreg command, it appears that the VCE option is not available for the
xtpcse command.  Has anybody utilized the bootstrapping technique in
conjunction with the xtpcse command?  Any other ideas for how best to
obtain the correct standard errors in this context?  Your suggestions
would be very much appreciated.
>
>Mark

*
*   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