Hi Jorge,
That was great! Thank you very much for the suggestion.
I just had to make a couple of minor changes (e.g., pearson vs. spearman)
and it worked perfectly.
Thanks,
Joao Pedro
Hi,
I'm sure it could be better but try this:
# F statistics based on lm
FSTAT=function(y,x) summary(lm(y~
Hi,
I'm sure it could be better but try this:
# F statistics based on lm
FSTAT=function(y,x) summary(lm(y~x))$f[1]
# Correlation and p-value
CORR=function(y,x){
tc=cor.test(x,y,method="spearman",alternative="two.sided")
temp=matrix(c(tc$estimate,tc$p.value),ncol=2)
colnames(temp)=c('rho','pvalue
2 matches
Mail list logo