Skip to content

Fixed .check_multicollinearity util function - #769

Open
will02-code wants to merge 2 commits into
easystats:mainfrom
will02-code:fix-check-collinarity
Open

Fixed .check_multicollinearity util function#769
will02-code wants to merge 2 commits into
easystats:mainfrom
will02-code:fix-check-collinarity

Conversation

@will02-code

Copy link
Copy Markdown

Description

The .check_multicollinearity function previously was setup so that it could never flag probable collinearity (>0.9), becuase the filtering by the first threshold changed the results df.

Proposed Changes

Changed so that either threshold can be triggered (created a different df for probable and possible collinearity)

Notes

First PR so please let me know if I have done anything incorrectly!

was setup so that it could never flag probable
collinearity (>0.9). Changed so that it now
will flag this.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a bug in R/utils_check_collinearity.R where the results data frame was being overwritten during the first threshold filtering, which incorrectly affected the subsequent filtering step. The fix introduces separate variables possible_collinear and probable_collinear for each filtering step. The reviewer feedback recommends using which() when subsetting the data frames to robustly handle potential NA values in the correlation column and prevent introducing NA rows.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread R/utils_check_collinearity.R Outdated
Comment thread R/utils_check_collinearity.R Outdated
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