g02df deletes an independent variable from a general linear regression model.
Syntax
C# |
---|
public static void g02df( int ip, double[,] q, int indx, ref double rss, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g02df ( _ ip As Integer, _ q As Double(,), _ indx As Integer, _ ByRef rss As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g02df( int ip, array<double,2>^ q, int indx, double% rss, [OutAttribute] int% ifail ) |
F# |
---|
static member g02df : ip : int * q : float[,] * indx : int * rss : float byref * ifail : int byref -> unit |
Parameters
- ip
- Type: System..::..Int32On entry: , the number of independent variables already in the model.Constraint: .
- q
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, ]Note: dim1 must satisfy the constraint:On entry: the results of the decomposition as returned by methods g02da g02dc g02de (G02EEF not in this release), or previous calls to g02df.On exit: the updated decomposition.
- indx
- Type: System..::..Int32On entry: indicates which independent variable is to be deleted from the model.Constraint: .
- rss
- Type: System..::..Double%On entry: the residual sum of squares for the full regression.Constraint: .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
When selecting a linear regression model it is sometimes useful to drop independent variables from the model and to examine the resulting sub-model. g02df updates the decomposition used in the computation of the linear regression model. The decomposition may come from g02da or g02de, or a previous call to g02df.
For the general linear regression model with independent variables fitted g02da or g02de compute a decomposition of the (weighted) independent variables and form an upper triangular matrix and a vector . To remove an independent variable and have to be updated. The column of corresponding to the variable to be dropped is removed and the matrix is then restored to upper triangular form by applying a series of Givens rotations. The rotations are then applied to . Note only the first elements of are affected.
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
Error Indicators and Warnings
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(LDQ) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, , or , or , or .
On entry, a diagonal element of is zero.
Accuracy
There will inevitably be some loss in accuracy in fitting a model by dropping terms from a more complex model rather than fitting it afresh using g02da.
Parallelism and Performance
None.
Further Comments
None.