fullRankMatrix: Generation of Full Rank Design Matrix

Creates a full rank matrix out of a given matrix. The intended use is for one-hot encoded design matrices that should be used in linear models to ensure that significant associations can be correctly interpreted. However, 'fullRankMatrix' can be applied to any matrix to make it full rank. It removes columns with only 0's, merges duplicated columns and discovers linearly dependent columns and replaces them with linearly independent columns that span the space of the original columns. Columns are renamed to reflect those modifications. This results in a full rank matrix that can be used as a design matrix in linear models. The algorithm and some functions are inspired by Kuhn, M. (2008) <doi:10.18637/jss.v028.i05>.

Package details

AuthorPaula Weidemueller [aut, cre, cph] (<https://orcid.org/0000-0003-3867-3131>, @PaulaH_W), Constantin Ahlmann-Eltze [aut] (<https://orcid.org/0000-0002-3762-068X>, @const_ae)
MaintainerPaula Weidemueller <paulahw3214@gmail.com>
LicenseMIT + file LICENSE
Version0.1.0
URL https://github.com/Pweidemueller/fullRankMatrix
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("fullRankMatrix")

Try the fullRankMatrix package in your browser

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

fullRankMatrix documentation built on July 3, 2024, 5:12 p.m.