Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: _rmcoll query

From   "Salvati, Jean" <[email protected]>
To   <[email protected]>
Subject   RE: st: _rmcoll query
Date   Mon, 7 Mar 2005 18:50:05 -0500

Bill Gould wrote:

> I have written before about how syminv() works.

I searched the list archives for more information about -syminv()-, but
I didn't come up with anything. Where can I find more information?

Specifically, I don't understand how looking for zeroes on the diagonal
of syminv(X'X) allows you to determine which variables cause singularity

In the case of a triangular matrix, I understand that if one of its
diagonal elements is zero, then its determinant is null, and therefore
the matrix is not inversible. But I can't figure out how to obtain a
similar result for the inverse of a symmetric matrix.

Do you use LU or QR decomposition?

Since my matrix algebra is rather limited, would you mind enlightening
me? Some of your competitors don't handle collinearity as quickly and
gracefully as Stata, so I'll understand if you don't want to go into
details, but any hint that you can provide will be much appreciated.

Of course, all list members are welcome to reply.

Thanks a lot.

Jean Salvati

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> William Gould, Stata
> Sent: Wednesday, February 16, 2005 9:21 AM
> To: [email protected]
> Subject: Re: st: _rmcoll query
> Roger Newson <[email protected]> asked
> > Can I assume that, in general, this is how -_rmcoll- works? And, if 
> > not, then how does it work?
> after speculating.
> Let varlist contain a set of variable names, among which we 
> want to find the noncolinear subset.  Stata forms 
> syminv((X-mean(X)'(X-mean(X)) (default,
> syminv(X'X) if option -noconstant- is specified) and then 
> searches along the diagonal for zero values, which correspond 
> to the collinear variables.  Thus,
> -_rmcoll- lets syminv() do the heavy lifting, which was not 
> only convenient to program but also guaranteed that -_rmcoll- 
> would produce results consistent with those of -regress- and 
> all of Stata's other estimation commands.
> syminv() is Stata's symmetric-matrix inversion routine.  I 
> have written before about how syminv() works.  In a nutshell, 
> syminv() decides which of a collinear set of variables to 
> drop based on numerical accuracy considerations; it does 
> *NOT* proceed from left to right, as Roger speculated.
> Roger observed that if the same variable appeared in varlist 
> more than once, the rightmost one was dropped.  In general, 
> that will happen in the equal-variable case because syminv() 
> searches from left to right every step of the way, but I 
> cannot guarantee the rightmost result because, in earlier 
> steps, operations are performed on the matrix and the order 
> in which the operations were performed depends on the 
> location of the row/column.
> -- Bill
> [email protected]
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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