Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use limma's nonEstimable and is.fullrank #20

Open
sreichl opened this issue Sep 18, 2024 · 0 comments
Open

use limma's nonEstimable and is.fullrank #20

sreichl opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sreichl
Copy link
Collaborator

sreichl commented Sep 18, 2024

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

@sreichl sreichl self-assigned this Sep 18, 2024
@sreichl sreichl added the enhancement New feature or request label Sep 18, 2024
@sreichl sreichl changed the title use limma's nonEmistable and is.fullrank use limma's nonEstimable and is.fullrank Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant