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

From |
Marcello Pagano <pagano@hsph.harvard.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Orthogonality Condition |

Date |
Tue, 08 Feb 2005 08:36:56 -0500 |

If I understand your question correctly, the answer is that if you use least squares, which is what -regress- does, then the residuals are orthogonal to the column space of X. This is because, solving the two sets of equations: X*X b = X*y & e = y-Xb which is what -regress- does, is equivalent to solving the (n+p)x(n+p) (n = # of observations, p = # of b) | y | | X I | | b | | | = | | | | | 0 | | 0 X | | e | where you have to visualize the matrix lines that I cannot draw here, but have replaced with | ! (I is the identity matrix, 0 is a matrix of zeroes.) In other words, given correct arithmetic, what you want to test is automatically true. Given the floating point system Stata uses for calculations, what you want to test is correct to round off error. Hope this helps, m.p. hisaki wrote: > I want to check the orthogonality condition by calculating > X*e, > where X is the matrix of the regressors and e is the residual . > As I use hundreds of specification such as > regress y x1 x2 > regress y x1 x2 x3 > regress y x1 x3 > ...., > I want to avoid typing all the regressors every time after estimation. > Is there any simple command to access the matrix of the regressors > such as "matrix X=e(regressors)"? > > Thanks in advance. > Hisaki > > > -------------------- > Kono Hisaki > Graduate School of Economics > University of Tokyo > hisaki@grad.e.u-tokyo.ac.jp > hisakijapan@yahoo.co.jp > > ---Be joyful always! > > > __________________________________ > Let's Celebrate Together! > Yahoo! JAPAN > http://pr.mail.yahoo.co.jp/so2005/ > > * > * 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/ * * 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/

**References**:**st: Orthogonality Condition***From:*"hisaki" <hisakijapan@yahoo.co.jp>

- Prev by Date:
**st: Comparing two poisson counts** - Next by Date:
**st: -update all- fails with "linestyle-p#line.style not found"** - Previous by thread:
**st: Orthogonality Condition** - Next by thread:
**Re: st: Orthogonality Condition** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |