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

Enhance add_integration function to detect and report multicollinearity issues #49

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dkarletsos
Copy link

The existing implementation returned a generic error message when multicollinearity caused issues with the correlation matrix. This PR enhances the add_integration function by adding functionality to detect and report multicollinearity in covariates by looking at the eigenvalues of the correlation matrix. When multicollinearity is present, the function now returns a clear and informative error message to help users identify the problematic covariates.

Key Changes:

  • Added a check for multicollinearity in covariates based on the correlation matrix eigenvalues.
  • Provided a specific error message when multicollinearity is detected, including the names of the collinear covariates, based on near-zero eigenvalues and their corresponding variable relationships.
  • Introduced a new test case in test-add_integration.R to verify the behavior of the function when multicollinearity exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant