1DGGGLM(1)             LAPACK driver routine (version 3.1)            DGGGLM(1)
2
3
4

NAME

6       DGGGLM - a general Gauss-Markov linear model (GLM) problem
7

SYNOPSIS

9       SUBROUTINE DGGGLM( N,  M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK, INFO
10                          )
11
12           INTEGER        INFO, LDA, LDB, LWORK, M, N, P
13
14           DOUBLE         PRECISION A( LDA, * ), B( LDB, * ), D( * ), WORK(  *
15                          ), X( * ), Y( * )
16

PURPOSE

18       DGGGLM solves a general Gauss-Markov linear model (GLM) problem:
19
20               minimize || y ||_2   subject to   d = A*x + B*y
21                   x
22
23       where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-
24       vector. It is assumed that M <= N <= M+P, and
25
26                  rank(A) = M    and    rank( A B ) = N.
27
28       Under these assumptions, the constrained equation is always consistent,
29       and there is a unique solution x and a minimal 2-norm solution y, which
30       is obtained using a generalized QR factorization of the matrices (A, B)
31       given by
32
33          A = Q*(R),   B = Q*T*Z.
34                (0)
35
36       In  particular, if matrix B is square nonsingular, then the problem GLM
37       is equivalent to the following weighted linear least squares problem
38
39                    minimize || inv(B)*(d-A*x) ||_2
40                        x
41
42       where inv(B) denotes the inverse of B.
43
44

ARGUMENTS

46       N       (input) INTEGER
47               The number of rows of the matrices A and B.  N >= 0.
48
49       M       (input) INTEGER
50               The number of columns of the matrix A.  0 <= M <= N.
51
52       P       (input) INTEGER
53               The number of columns of the matrix B.  P >= N-M.
54
55       A       (input/output) DOUBLE PRECISION array, dimension (LDA,M)
56               On entry, the N-by-M matrix A.  On exit, the  upper  triangular
57               part of the array A contains the M-by-M upper triangular matrix
58               R.
59
60       LDA     (input) INTEGER
61               The leading dimension of the array A. LDA >= max(1,N).
62
63       B       (input/output) DOUBLE PRECISION array, dimension (LDB,P)
64               On entry, the N-by-P matrix B.  On exit, if N <= P,  the  upper
65               triangle  of  the  subarray  B(1:N,P-N+1:P) contains the N-by-N
66               upper triangular matrix T; if N > P, the elements on and  above
67               the  (N-P)th  subdiagonal  contain the N-by-P upper trapezoidal
68               matrix T.
69
70       LDB     (input) INTEGER
71               The leading dimension of the array B. LDB >= max(1,N).
72
73       D       (input/output) DOUBLE PRECISION array, dimension (N)
74               On entry, D is the left hand side  of  the  GLM  equation.   On
75               exit, D is destroyed.
76
77       X       (output) DOUBLE PRECISION array, dimension (M)
78               Y       (output) DOUBLE PRECISION array, dimension (P) On exit,
79               X and Y are the solutions of the GLM problem.
80
81       WORK      (workspace/output)   DOUBLE   PRECISION   array,    dimension
82       (MAX(1,LWORK))
83               On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
84
85       LWORK   (input) INTEGER
86               The  dimension  of  the array WORK. LWORK >= max(1,N+M+P).  For
87               optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB, where  NB
88               is  an  upper  bound  for  the  optimal  blocksizes for DGEQRF,
89               SGERQF, DORMQR and SORMRQ.
90
91               If LWORK = -1, then a workspace query is assumed;  the  routine
92               only  calculates  the  optimal  size of the WORK array, returns
93               this value as the first entry of the WORK array, and  no  error
94               message related to LWORK is issued by XERBLA.
95
96       INFO    (output) INTEGER
97               = 0:  successful exit.
98               < 0:  if INFO = -i, the i-th argument had an illegal value.
99               =  1:   the  upper triangular factor R associated with A in the
100               generalized QR factorization of the pair (A, B) is singular, so
101               that  rank(A) < M; the least squares solution could not be com‐
102               puted.  = 2:  the bottom (N-M)  by  (N-M)  part  of  the  upper
103               trapezoidal  factor  T  associated with B in the generalized QR
104               factorization of the pair (A, B) is singular, so that rank( A B
105               ) < N; the least squares solution could not be computed.
106
107
108
109 LAPACK driver routine (version 3.N1o)vember 2006                       DGGGLM(1)
Impressum