ensure_full_rank function

Ensure a Design Matrix has Full (Column) Rank

Ensure a Design Matrix has Full (Column) Rank

Determine and drop redundant columns using the qr

decomposition.

ensure_full_rank(X, tol = 1e-07, silent = FALSE, test.ans = FALSE)

Arguments

  • X: a design matrix as produced by model.matrix.
  • tol: qr tolerance.
  • silent: throw message if columns are dropped from X? Default is FALSE.
  • test.ans: Test if the resulting/returned matrix has full rank? Default is FALSE.

Returns

A design matrix in which redundant columns are dropped

  • Maintainer: Rune Haubo Bojesen Christensen
  • License: GPL (>= 2)
  • Last published: 2020-10-23