g02gn gives the estimate of an estimable function along with its standard error from the results from fitting a generalized linear model.


public static void g02gn(
	int ip,
	int irank,
	double[] b,
	double[] cov,
	double[,] v,
	double[] f,
	out bool est,
	out double stat,
	out double sestat,
	out double z,
	double tol,
	out int ifail
Visual Basic
Public Shared Sub g02gn ( _
	ip As Integer, _
	irank As Integer, _
	b As Double(), _
	cov As Double(), _
	v As Double(,), _
	f As Double(), _
	<OutAttribute> ByRef est As Boolean, _
	<OutAttribute> ByRef stat As Double, _
	<OutAttribute> ByRef sestat As Double, _
	<OutAttribute> ByRef z As Double, _
	tol As Double, _
	<OutAttribute> ByRef ifail As Integer _
Visual C++
static void g02gn(
	int ip, 
	int irank, 
	array<double>^ b, 
	array<double>^ cov, 
	array<double,2>^ v, 
	array<double>^ f, 
	[OutAttribute] bool% est, 
	[OutAttribute] double% stat, 
	[OutAttribute] double% sestat, 
	[OutAttribute] double% z, 
	double tol, 
	[OutAttribute] int% ifail
static member g02gn : 
        ip : int * 
        irank : int * 
        b : float[] * 
        cov : float[] * 
        v : float[,] * 
        f : float[] * 
        est : bool byref * 
        stat : float byref * 
        sestat : float byref * 
        z : float byref * 
        tol : 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: k, the rank of the dependent variables.
Constraint: 1irankip.
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: the ip values of the estimates of the parameters of the model, β^.
Type: array<System..::..Double>[]()[][]
An array of size [ip×ip+1/2]
On entry: 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: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, ip+7]
Note: dim1 must satisfy the constraint: dim1ip
On entry: as returned by g02gag02gbg02gc and g02gd.
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: f, the linear function to be estimated.
Type: System..::..Boolean%
On exit: indicates if the function was estimable.
The function is estimable.
The function is not estimable and stat, sestat and z are not set.
Type: System..::..Double%
On exit: if est=true, stat contains the estimate of the function, fTβ^
Type: System..::..Double%
On exit: if est=true, sestat contains the standard error of the estimate of the function, seF.
Type: System..::..Double%
On exit: if est=true, z contains the z statistic for the test of the function being equal to zero.
Type: System..::..Double
On entry: the tolerance value used in the check for estimability, η.
If tol0.0 then ε, where ε is the machine precision, is used instead.
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).


g02gn computes the estimates of an estimable function for a generalized linear model which is not of full rank. It is intended for use after a call to g02gag02gbg02gc or g02gd. An estimable function is a linear combination of the parameters such that it has a unique estimate. For a full rank model all linear combinations of parameters are estimable.
In the case of a model not of full rank the methods use a singular value decomposition (SVD) to find the parameter estimates, β^, and their variance-covariance matrix. Given the upper triangular matrix R obtained from the QR decomposition of the independent variables the SVD gives
where D is a k by k diagonal matrix with nonzero diagonal elements, k being the rank of R, and Q* and P are p by p orthogonal matrices. This leads to a solution:
P1 being the first k columns of P, i.e., P=P1P0; Q*1 being the first k columns of Q*, and c1 being the first p elements of c.
Details of the SVD are made available in the form of the matrix P*:
as described by g02gag02gbg02gc and g02gd.
A linear function of the parameters, F=fTβ, can be tested to see if it is estimable by computing ζ=P0Tf. If ζ is zero, then the function is estimable, if not; the function is not estimable. In practice ζ is tested against some small quantity η.
Given that F is estimable it can be estimated by fTβ^ and its standard error calculated from the variance-covariance matrix of β^, Cβ, as
Also a z statistic
can be computed. The distribution of z will be approximately Normal.


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

Note: g02gn may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (LDV) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry,ip<1,
On entry,irank=ip. In this case est is returned as true and all statistics are calculated.
Standard error of statistic =0.0; this may be due to rounding errors if the standard error is very small or due to mis-specified inputs cov and f.
An error occured, see message report.
Invalid Parameters value
Invalid dimension for array value
Negative dimension for array value
Invalid Parameters value


The computations are believed to be stable.

Parallelism and Performance


Further Comments

The value of estimable functions is independent of the solution chosen from the many possible solutions. While g02gn may be used to estimate functions of the parameters of the model as computed by g02gk, βc, these must be expressed in terms of the original parameters, β. The relation between the two sets of parameters may not be straightforward.


See Also