The R Project SVN R

Rev

Rev 13602 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13602 Rev 15168
Line 18... Line 18...
18
c  along with this program; if not, write to the Free Software
18
c  along with this program; if not, write to the Free Software
19
c  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
c  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
c
20
c
21
c-----------------------------------------------------------------------
21
c-----------------------------------------------------------------------
22
c
22
c
23
c	ch2inv() computes the inverse of a positive-definite symmetric
23
c ch2inv(x, ldx, n, v, info) computes the inverse of a positive-definite
24
c	matrix from its choleski factorization.	 This can be used (for
24
c		symmetric matrix from its choleski factorization.
25
c	example) to compute the dispersion matrix for the estimated
25
c This can be used, e.g., to compute the dispersion matrix for the estimated
26
c	parameters in a regression analysis.
26
c parameters in a regression analysis.
27
c
27
c
28
c	On Entry
28
c On Entry
29
c
29
c
30
c	  x	    double precision(ldx,k)
30
c	x	double precision(ldx,n)	 {ldx >= n}
31
c		    the choleski decomposition or the
31
c		the choleski decomposition or the qr decomposition
32
c		    qr decomposition as computed by dqrdc
32
c		as computed by dqrdc or dqrdc2.	 Only the
33
c		    or dqrdc2
33
c		UPPER TRIANGULAR part,	x(i,j), 1 <= i <= j <= n, is accessed.
34
c
34
c
35
c	  ldx	    integer
35
c	ldx	integer, ldx >= n
36
c		    the leading dimension of the array x
36
c		the leading dimension of the array x
37
c
37
c
38
c	  n	    integer
38
c	n	integer
39
c		    the number of rows of the matrix x
39
c		the number of rows and columns of the matrix x
40
c
40
c
41
c	  k	    integer
41
c On Return
42
c		    the number of columns in the matrix k
-
 
43
c
42
c
44
c	On Return
43
c	v	double precision(n,n)
-
 
44
c		the value of inverse(x'x)
45
c
45
c
46
c	  v	    double precision(k,k)
-
 
47
c		    the value of inverse(x'x)
-
 
48
c
-
 
49
c	This version dated Aug 24, 1996.
46
c This version dated Aug 24, 1996.
50
c	Ross Ihaka, University of Auckland.
47
c Ross Ihaka, University of Auckland.
51
c
48
c
52
      subroutine ch2inv(x, ldx, n, v, info)
49
      subroutine ch2inv(x, ldx, n, v, info)
53
c     implicit none
50
c     implicit none
54
      integer n, ldx, info
51
      integer n, ldx, info
55
      double precision x(ldx, n), v(n, n)
52
      double precision x(ldx, n), v(n, n)