I am struggling to know how to conduct a partial correlation when data is not normally distributed...
I have tried this and it is giving me data (the code has worked), but is this how you would actually do it?
partial.r(
data <- df[, c("X", "Y", "Z")],
method = "spearman"
)
Thanks!
The data frame is not specified, so it hard to know what you are trying to do.
However, given a dataset, df, that you want to find all (spearman) correlations partialed for all the other ones:
#or use formula input:
Which will find the correlation between X and Y partialling out Z.