Hi,
Is there a simple way to do correlation coefficient tests with
cor.test like I would do with cor function? I have a data frame
where each column is a list.
y - data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20))
cor(y)
Try this:
y - data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20))
x - diag(1, length(names(y))
cors - combn(names(y), 2,
FUN = function(x)cor.test(y[,x[1]], y[,x[2]])$p.value)
x[lower.tri(x)] - cors
x[upper.tri(x)] - cors
On 5/2/08, Sang Chul Choi [EMAIL PROTECTED]
2 matches
Mail list logo