G02DFF deletes an independent variable from a general linear regression model.
When selecting a linear regression model it is sometimes useful to drop independent variables from the model and to examine the resulting sub-model. G02DFF updates the
$QR$ decomposition used in the computation of the linear regression model. The
$QR$ decomposition may come from
G02DAF or
G02DEF, or a previous call to G02DFF.
For the general linear regression model with
$p$ independent variables fitted
G02DAF or
G02DEF compute a
$QR$ decomposition of the (weighted) independent variables and form an upper triangular matrix
$R$ and a vector
$c$. To remove an independent variable
$R$ and
$c$ have to be updated. The column of
$R$ 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
$c$. Note only the first
$p$ elements of
$c$ are affected.
The method used means that while the updated values of
$R$ and
$c$ are computed an updated value of
$Q$ from the
$QR$ decomposition is not available so a call to
G02DEF cannot be made after a call to G02DFF.
G02DDF can be used to calculate the parameter estimates,
$\hat{\beta}$, from the information provided by G02DFF.
Hammarling S (1985) The singular value decomposition in multivariate statistics SIGNUM Newsl. 20(3) 2–25
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
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
G02DAF.
None.
A dataset consisting of
$12$ observations on four independent variables and one dependent variable is read in. The full model, including a mean term, is fitted using
G02DAF. The value of
INDX is read in and that variable dropped from the regression. The parameter estimates are calculated by
G02DDF and printed. This process is repeated until
INDX is
$0$.