Skip to content

use limma's nonEstimable and is.fullrank #20

@sreichl

Description

@sreichl

Consider replacing

# check if the model represented by the design matrix has full rank ie linearly independent columns, which is required to make the model identifiable!
# new: more efficient and computationally stable compared to the svd() function, especially for large matrices, and it does not require rounding the singular values or checking for non-zero values.
if(qr(model_matrix)$rank != ncol(model_matrix)){
stop("Error: The design matrix representing your model does not have full rank, rendering the model not identifiable.")
}

with limma's function nonEstimable, which shows problematic coloumns and is.fullrank as TRUE/FALSE check.

https://www.rdocumentation.org/packages/limma/versions/3.28.14/topics/is.fullrank

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions