Skip to content
Snippets Groups Projects
is_fullrank.Rd 968 B
Newer Older
Arnaud Duvermy's avatar
Arnaud Duvermy committed
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitmodel.R
\name{is_fullrank}
\alias{is_fullrank}
\title{Check if a Model Matrix is Full Rank}
\usage{
is_fullrank(metadata, formula)
}
\arguments{
\item{metadata}{The metadata used to create the model matrix.}

\item{formula}{The formula used to specify the model matrix.}
}
\value{
\code{TRUE} if the model matrix is full rank, \code{FALSE} otherwise.
}
\description{
This function checks whether a model matrix is full rank, which is essential for
certain statistical analyses. It computes the eigenvalues of the crossproduct
of the model matrix and determines if the first eigenvalue is positive and if
the ratio of the last eigenvalue to the first is within a defined tolerance.
}
\details{
This function is inspired by a similar function found in the Limma package.
}
\examples{
metadata <- data.frame(x = rnorm(10), y = rnorm(10))
formula <- y ~ x
is_fullrank(metadata, formula)


}