R/make_matrix_full_rank.default.R

make_matrix_full_rank.default <- function(X){

  # Function removes as many columns from the matrix as needed to make the matrix X full-rank

  # Input: X: matrix of class 'matrix' or any of the classes of the package 'Matrix'

  # Output: the full rank-matrix

  qX = Matrix::qr(X)

  make_matrix_full_rank( qX, X)

}

Try the lmvar package in your browser

Any scripts or data that you put into this service are public.

lmvar documentation built on May 16, 2019, 5:06 p.m.