-
Notifications
You must be signed in to change notification settings - Fork 5
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
correlate_partial() #27
Conversation
Merge should aim at |
Code looks good and validates well. However, I was expecting an extension to the |
… in an internal function
Good point. I've just pushed a new commit that implements a change to the Despite my initial concerns, I see the advantage to expand on the |
Implements the
correlate_partial
function based onppcor::pcor.test
.Accepts exactly three numeric variables and computes pairwise partial correlations (pearson, kendall, spearman) for all combinations, i.e. pairs, of specified variables while controlling for the third variable. Stops and provides a case-specific warning if too little or too many variables or non-numeric variables are provided.
If input data is grouped, groups are dropped and a warning is issued.
Combinations of pairs are calculated using
combinat::permn
.Returns a tibble.
Currently missing is the additional model as an attribute. This is added by @joon-e, see #24 .