g02dn gives the estimate of an estimable function along with its standard error.

Syntax

C#
public static void g02dn(
	int ip,
	int irank,
	double[] b,
	double[] cov,
	double[] p,
	double[] f,
	out bool est,
	out double stat,
	out double sestat,
	out double t,
	double tol,
	out int ifail
)
Visual Basic
Public Shared Sub g02dn ( _
	ip As Integer, _
	irank As Integer, _
	b As Double(), _
	cov As Double(), _
	p As Double(), _
	f As Double(), _
	<OutAttribute> ByRef est As Boolean, _
	<OutAttribute> ByRef stat As Double, _
	<OutAttribute> ByRef sestat As Double, _
	<OutAttribute> ByRef t As Double, _
	tol As Double, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void g02dn(
	int ip, 
	int irank, 
	array<double>^ b, 
	array<double>^ cov, 
	array<double>^ p, 
	array<double>^ f, 
	[OutAttribute] bool% est, 
	[OutAttribute] double% stat, 
	[OutAttribute] double% sestat, 
	[OutAttribute] double% t, 
	double tol, 
	[OutAttribute] int% ifail
)
F#
static member g02dn : 
        ip : int * 
        irank : int * 
        b : float[] * 
        cov : float[] * 
        p : float[] * 
        f : float[] * 
        est : bool byref * 
        stat : float byref * 
        sestat : float byref * 
        t : float byref * 
        tol : float * 
        ifail : int byref -> unit 

Parameters

ip
Type: System..::..Int32
On entry: p, the number of terms in the linear model.
Constraint: ip1.
irank
Type: System..::..Int32
On entry: k, the rank of the independent variables.
Constraint: 1irankip.
b
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: the ip values of the estimates of the parameters of the model, β^.
cov
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].
p
Type: array<System..::..Double>[]()[][]
An array of size [ip×ip+2×ip]
On entry: as returned by g02da and g02dd.
f
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: f, the linear function to be estimated.
est
Type: System..::..Boolean%
On exit: indicates if the function was estimable.
est=true
The function is estimable.
est=false
The function is not estimable and stat, sestat and t are not set.
stat
Type: System..::..Double%
On exit: if est=true, stat contains the estimate of the function, fTβ^.
sestat
Type: System..::..Double%
On exit: if est=true, sestat contains the standard error of the estimate of the function, seF.
t
Type: System..::..Double%
On exit: if est=true, t contains the t-statistic for the test of the function being equal to zero.
tol
Type: System..::..Double
On entry: η, the tolerance value used in the check for estimability.
tol0.0
ε, where ε is the machine precision, is used instead.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Description

g02dn computes the estimates of an estimable function for a general linear regression model which is not of full rank. It is intended for use after a call to g02da or g02dd. 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
R=Q*D000PT,
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 gives the solution
β^=P1D-1Q*1Tc1,
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*:
P*=D-1P1TP0T,
as given by g02da and g02dd.
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
seF=fTCβf.
Also a t-statistic,
t=fTβ^seF,
can be computed. The t-statistic will have a Student's t-distribution with degrees of freedom as given by the degrees of freedom for the residual sum of squares for the model.

References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Hammarling S (1985) The singular value decomposition in multivariate statistics SIGNUM Newsl. 20(3) 2–25
Searle S R (1971) Linear Models Wiley

Error Indicators and Warnings

Note: g02dn may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
ifail=1
On entry,ip<1,
orirank<1,
orirank>ip.
ifail=2
On entry,irank=ip. In this case est is returned as true and all statistics are calculated.
ifail=3
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.
ifail=-9000
An error occured, see message report.
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

The computations are believed to be stable.

Parallelism and Performance

None.

Further Comments

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

Example

See Also