Learn R Programming

VCA (version 1.2.1)

Csweep: Calling C-implementation of the SWEEP-Operator

Description

Function calls a fast C-implementation of the SWEEP operator using the transpose of the original augmented matrix $X'X$ (see getSSQsweep). Transposing prior to applying the SWEEP-operator speeds up things since the complete matrix is stored in memory in consecutive manner.

Usage

Csweep(M, asgn, thresh = 1e-12, tol = 1e-12, Ncpu = 1)

Arguments

M
(matrix) matrix, representing the augmented matrix $X'X$
asgn
(integer) vector, identifying columns in $M$ corresponding to variables, respectively, to their coefficients
thresh
(numeric) value used to check whether the influence of the a coefficient to reducing the error sum of squares is small enough to conclude that the corresponding column in $X'X$ is a linear combination of preceding columns
tol
(numeric) value used to check numerical equivalence to zero
Ncpu
(integer) number of cores to be used for parallel processing (not yet used)

Value

  • (list) with two elements:
  • SSQ(numeric) vector of ANOVA sum of squares
  • LC(integer) vector indicating linear dependence of each column

Details

This is an utility-function not intended to be called directly.

References

Goodnight, J.H. (1979), A Tutorial on the SWEEP Operator, The American Statistician, 33:3, 149-158