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

st: RE: Could Not Find Idempotent Matrix Inverse


From   "FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)" <alan.h.feiveson@nasa.gov>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Could Not Find Idempotent Matrix Inverse
Date   Mon, 1 Nov 2004 08:46:49 -0600

The only idempotent matrix that is not singular is the identity matrix. All
others won't have an inverse.

Al Feiveson

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of BASSOLE
Sent: Sunday, October 31, 2004 12:49 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Could Not Find Idempotent Matrix Inverse


Dear all,
I trying to program to make estimate multi-way error components models with
unbalanced data structures. My program is based on Peter DAVIS (2002)
article on
Journal of Econometric. When I want to make the inverse of Idempotent matrix
(Qhhvv), STATA return the error message "Matrix has missing value". But,
before
making the invers, I check the missings values in the matrix and no missing
values are present. After this  I decide to calcul the determinant of this
matrix, and here STATA return dot, instead of the value of determinant. I
dont
know why. Before send the mail I make the same program in TSP, and here I
have
not see the programe for calculate the inverse of the same matrix (Qhhvv).
/*Create the orthogonal projection matrices for each variances component*/;
*For Household*;
mkmat idm1-idm346, matrix(hh);
mat Phh = hh*(inv(hh'*hh))*hh';
mat Qhh = INN - Phh;
*For Villages*;
mkmat codevillage1-codevillage58, matrix(vv);
mat Pvv = vv*(inv(vv'*vv))*vv';
mat Qvv = INN - Pvv;
/*Apply Lemma 1 (p.70) in Davis(2002)*/;
 *Here, X1 are households and X2 villages*;
mat Qhhvv   = Qhh*vv;
mat Qhhvv = Qhh*vv;
mat PQhhvv = Qhhvv*inv(Qhhvv'*Qhhvv)*Qhhvv';
matrix has missing values
r(504);
Does anybody know the solution to this problem?
Thank you in advance.


Léandre BASSOLE
CERDI-CNRS
65 Boulevard F. Mitterrand
Boite Postale 320
63009 Clermont-Ferrand CEDEX 1
FRANCE
Tel : 04 73 17 74 00
Fax : 04 73 17 74 28

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



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