From Woong.Chung@colorado.edu To statalist@hsphsun2.harvard.edu Subject Re:st:Re-asking Generated regressor problem Date Mon, 16 Oct 2006 16:03:05 -0600

```Dear statlist:
I should have asked questions more specific as suggested by.

As a basic example,

Y = &#946;0 + &#946;1X + U (2nd stage)
and

X = &#945;0 + &#945;1Z + Q.(1st stage)

We are interested in the effect of X on Y . If we plug X into the equation for
Y we get

Y = &#946;0 + &#946;1 (&#945;0 + &#945;1Z + Q) + U
= (&#946;0 + &#946;1&#945;0) + &#946;1&#945;1Z + &#946;1Q + U.
= k0 + k1Z + &#946;1Q + U

In the above example the standard errors from the second stage OLS are not
correct! The
reason is that the estimate of &#963;2 is wrong. Using the usual estimator of
&#963;2 the
second stage
OLS would give us
&#963;2 =1/N*sum^2 {Yi &#8722; (k0 + k1Zi + &#946;1Qi)}

when in fact it should have to be
&#963;2 =1/N*sum^2{Yi-(k0 + k1Zi + &#946;1Qi)}

technically speaking, we need to convert Qihat into Qi

How to implement this at Stata? Looks like we need to create matrix for this
implementation? I am so pleased if anyone shows me some matrix codes for this
example.
Someone mentioned a Wooldridge's "econometric analysis..." chapter #6 but it
was so hard for identifying m matrix as well as other matrix form.

Any helpful codes or words are glad to solve my long-term concerns.

WT

WT:
Whether inference is valid depends on whether your model is appropriate for
since you haven't told us anything about these three things.
HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

--- Woong Chung wrote:
> Regarding "generated Regressor problem", there are many same questions-"how to
> deal with varaince-covariance matrix that make the inference valid" in STATA.
> Unfortunately, I have yet found any clear answers about the questions. Is it
> because there are no ways or commands in stata to solve? or hard to explain to
> making a coding to create var-covariance matrix? (or maybe it is too easy to