[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Orthogonality Condition
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,
> I want to check the orthogonality condition by calculating
> 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.
> Kono Hisaki
> Graduate School of Economics
> University of Tokyo
> ---Be joyful always!
> Let's Celebrate Together!
> Yahoo! JAPAN
> * 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: