0

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!

1 Answer 1

0

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:

partial.r(data=df[, c("X", "Y", "Z")],method="spearman")

#or use formula input:

partial.r(X ~ Y - Z, data=df, method="spearman")

Which will find the correlation between X and Y partialling out Z.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.