- Type: System..::..StringOn entry: indicates if an observation is to be added or deleted.
Constraint: or .
- The observation is added.
- The observation is deleted.
- Type: System..::..StringOn entry: indicates if a mean has been used in the model.Constraint: or .
- Type: System..::..StringOn entry: indicates if a weight is to be used.
Constraint: or .
- The new observation is unweighted.
- The new observation is to be weighted and the weight must be supplied in wt.
- Type: System..::..Int32On entry: , the total number of independent variables in the dataset.Constraint: .
- Type: array<System..::..Int32>()An array of size [m]On entry: if is greater than , the value contained in is to be included as a value of , for .
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, ]Note: dim1 must satisfy the constraint:On entry: must be array q as output by g02da g02de g02df (G02EEF not in this release), or a previous call to g02dc.
- Type: System..::..Int32On entry: the number of linear terms in general linear regression model (including mean if there is one).Constraint: .
- Type: array<System..::..Double>()An array of size [dim1]Note: the dimension of the array x must be at least .
- Type: System..::..DoubleOn entry: the value of the dependent variable for the new observation, .
- Type: System..::..DoubleOn entry: if , wt must contain the weight to be used with the new observation.If , the observation is not included in the model.If , wt is not referenced.Constraint: if , .
- Type: System..::..Double%On entry: the value of the residual sums of squares for the original set of observations.Constraint: .On exit: the updated values of the residual sums of squares.Note: this will only be valid if the model is of full rank.
g02da fits a general linear regression model to a dataset. You may wish to change the model by either adding or deleting an observation from the dataset. g02dc takes the results from g02da and makes the required changes to the vector and the upper triangular matrix produced by g02da. The regression coefficients, standard errors and the variance-covariance matrix of the regression coefficients can be obtained from g02dd after all required changes to the dataset have been made.
g02da performs a decomposition on the (weighted) matrix of independent variables. To add a new observation to a model with parameters, the upper triangular matrix and vector (the first elements of ) are augmented by the new observation on independent variables in and dependent variable . Givens rotations are then used to restore the upper triangular form.
Note: only and the upper part of are updated the remainder of the matrix is unchanged.
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
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 , or or , or or , or or , or and there are not exactly nonzero values of isx, or and there are not exactly ip nonzero values of isx, On entry, and .
- The matrix could not be updated. This may occur if an attempt is made to delete an observation which was not in the original dataset or to add an observation to a matrix with a zero diagonal element. This error is also possible when removing an observation which reduces the rank of design matrix. In such cases the model should be recomputed using g02da.
- The residual sums of squares cannot be updated. This will occur if the input residual sum of squares is less than the calculated decrease in residual sum of squares when the new observation is deleted.
Higher accuracy is achieved by updating the matrix rather than the traditional methods of updating .
Care should be taken with the use of g02dc.
g02dc may also be used after g02de g02df (G02EEF not in this release).
|(a)||It is possible to delete observations which were not included in the original model.|
|(b)||If several additions/deletions have been performed you are advised to recompute the regression using g02da.|
|(c)||Adding or deleting observations can alter the rank of the model. Such changes will only be detected when a call to g02dd has been made. g02dd should also be used to compute the new residual sum of squares when the model is not of full rank.|