g02gk calculates the estimates of the parameters of a generalized linear model for given constraints from the singular value decomposition results.


public static void g02gk(
	int ip,
	int iconst,
	double[,] v,
	double[,] c,
	double[] b,
	double s,
	double[] se,
	double[] cov,
	out int ifail
Visual Basic
Public Shared Sub g02gk ( _
	ip As Integer, _
	iconst As Integer, _
	v As Double(,), _
	c As Double(,), _
	b As Double(), _
	s As Double, _
	se As Double(), _
	cov As Double(), _
	<OutAttribute> ByRef ifail As Integer _
Visual C++
static void g02gk(
	int ip, 
	int iconst, 
	array<double,2>^ v, 
	array<double,2>^ c, 
	array<double>^ b, 
	double s, 
	array<double>^ se, 
	array<double>^ cov, 
	[OutAttribute] int% ifail
static member g02gk : 
        ip : int * 
        iconst : int * 
        v : float[,] * 
        c : float[,] * 
        b : float[] * 
        s : float * 
        se : float[] * 
        cov : float[] * 
        ifail : int byref -> unit 


Type: System..::..Int32
On entry: p, the number of terms in the linear model.
Constraint: ip1.
Type: System..::..Int32
On entry: the number of constraints to be imposed on the parameters, nc.
Constraint: 0<iconst<ip.
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, ip+7]
Note: dim1 must satisfy the constraint: dim1ip.
dim1 should be as supplied to g02gag02gbg02gc or g02gd
On entry: the array v as returned by g02gag02gbg02gc or g02gd.
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, iconst]
Note: dim1 must satisfy the constraint: dim1ip
On entry: contains the iconst constraints stored by column, i.e., the ith constraint is stored in the ith column of c.
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: the parameter estimates computed by using the singular value decomposition, β^svd.
On exit: the parameter estimates of the parameters with the constraints imposed, β^c.
Type: System..::..Double
On entry: the estimate of the scale parameter.
For results from g02ga and g02gd then s is the scale parameter for the model.
For results from g02gb and g02gc then s should be set to 1.0.
Constraint: s>0.0.
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On exit: the standard error of the parameter estimates in b.
Type: array<System..::..Double>[]()[][]
An array of size [ip×ip+1/2]
On exit: the upper triangular part of the variance-covariance matrix of the ip parameter estimates given in b. They are stored packed by column, i.e., the covariance between the parameter estimate given in b[i-1] and the parameter estimate given in b[j-1], ji, is stored in cov[j×j-1/2+i-1].
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).


g02gk computes the estimates given a set of linear constraints for a generalized linear model which is not of full rank. It is intended for use after a call to g02gag02gbg02gc or g02gd.
In the case of a model not of full rank the methods use a singular value decomposition to find the parameter estimates, β^svd, and their variance-covariance matrix. Details of the SVD are made available in the form of the matrix P*:
as described by g02gag02gbg02gc and g02gd. Alternative solutions can be formed by imposing constraints on the parameters. If there are p parameters and the rank of the model is k then nc=p-k constraints will have to be imposed to obtain a unique solution.
Let C be a p by nc matrix of constraints, such that
then the new parameter estimates β^c are given by:
β^c=Aβ^svd=I-P0CTP0-1β^svd,   where ​I​ is the identity matrix,
and the variance-covariance matrix is given by
provided CTP0-1 exists.


Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
McCullagh P and Nelder J A (1983) Generalized Linear Models Chapman and Hall
Searle S R (1971) Linear Models Wiley

Error Indicators and Warnings

Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (LDV, LDC) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry,ip<1.
c does not give a model of full rank.
An error occured, see message report.
Invalid Parameters value
Invalid dimension for array value
Negative dimension for array value
Invalid Parameters value


It should be noted that due to rounding errors a parameter that should be zero when the constraints have been imposed may be returned as a value of order machine precision.

Parallelism and Performance


Further Comments

g02gk is intended for use in situations in which dummy (01) variables have been used such as in the analysis of designed experiments when you do not wish to change the parameters of the model to give a full rank model. The method is not intended for situations in which the relationships between the independent variables are only approximate.


See Also