g02gk calculates the estimates of the parameters of a generalized linear model for given constraints from the singular value decomposition results.
Syntax
C# |
---|
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++ |
---|
public: 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 ) |
F# |
---|
static member g02gk : ip : int * iconst : int * v : float[,] * c : float[,] * b : float[] * s : float * se : float[] * cov : float[] * ifail : int byref -> unit |
Parameters
- ip
- Type: System..::..Int32On entry: , the number of terms in the linear model.Constraint: .
- iconst
- Type: System..::..Int32On entry: the number of constraints to be imposed on the parameters, .Constraint: .
- v
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, ]
- c
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, iconst]Note: dim1 must satisfy the constraint:
- b
- Type: array<System..::..Double>[]()[][]An array of size [ip]On entry: the parameter estimates computed by using the singular value decomposition, .On exit: the parameter estimates of the parameters with the constraints imposed, .
- s
- Type: System..::..DoubleOn entry: the estimate of the scale parameter.Constraint: .
- se
- Type: array<System..::..Double>[]()[][]An array of size [ip]On exit: the standard error of the parameter estimates in b.
- cov
- Type: array<System..::..Double>[]()[][]An array of size []
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
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 g02ga, g02gb, g02gc or g02gd.
In the case of a model not of full rank the methods use a singular value decomposition to find the parameter estimates, , and their variance-covariance matrix. Details of the SVD are made available in the form of the matrix :
as described by g02ga, g02gb, g02gc and g02gd. Alternative solutions can be formed by imposing constraints on the parameters. If there are parameters and the rank of the model is then constraints will have to be imposed to obtain a unique solution.
Let be a by matrix of constraints, such that
then the new parameter estimates are given by:
and the variance-covariance matrix is given by
provided exists.
References
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, . or , or , or .
- c does not give a model of full rank.
Accuracy
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
None.
Further Comments
g02gk is intended for use in situations in which dummy () 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.