Article From: Department of Economics Subject: PARTINV.PRC Posted by: Information Provider Phone Number: (202) 885-3770 E-Mail Address: econ@american.edu Post Date: 23 Sep 1994 Expiration Date: 23 Oct 2004 PARTINV.PRC (Ogaki) @ PARTINV.PRC @ @------------------------------------------------------------------------------ Written by: Masao Ogaki Department of Economics, University of Chicago Last Revision: 09/17/87 ------------------------------------------------------------------------------@ /* This procedure iterates partitioned inverse to get inverse of a matrix of the form: A=|R(0),R(1),...,R(p-1)| |R(1)',R(0),..... | | ... | |R(p-1)',...... ,R(0)| Input: r=[R(0),R(1),...,R(p-1)]: n by n*p matrix Output: matrix inv(A) Syntax: B=partinv(r); */ proc partinv(r); local n,m,p,r0,b0,d0,i,b22,b21; n=rows(r); m=cols(r); p=round(m/n); r0=r[.,1:n]; b0=invpd(r0); d0=r[.,(n+1):2*n]; b22=inv(r0-d0'b0*d0); b21=(-1)*b22*(d0')*b0; b0=((b0-b0*d0*b21)~(b21'))|(b21~b22); i=2; do until i==p; d0=r[.,(i*n+1):((i+1)*n)]|d0; b22=inv(r0-d0'b0*d0); b21=(-1)*b22*(d0')*b0; b0=((b0-b0*d0*b21)~(b21'))|(b21~b22); i=i+1; endo; retp(b0); endp; ************************************************************************ Department of Economics is entirely responsible for the information provided above. Please direct any comments to Information Provider at: E-Mail Address: econ@american.edu Phone Number: (202) 885-3770