Displaying 1 result from an estimated 1 matches for "tp3607080p3607134".
2011 Jun 18
1
Conditional Correlation
Hi,
How can I accomplish this in R. Example:
I have the following data.frame:
data <- data.frame(x=c(1,2,3,4,5,6,5,3,7,1,0,4,8),y=c(1,2,1,2,2,2,1,1,1,2,2,2,2),z=c(5,8,4,3,4,1,6,3,3,6,3,5,7))
Supposing that data$y is a factor, I would like to find the Spearman correlation between data$x and data$z indexing it by data$y.
To be more specific, I want to find two correlations: between x and z