dyb1110@126.com
以下是我做一组数据相关的显著性分析代码
setwd("d:/R-analysis/three points")
#用psych包做显著性分析#
library(psych)
d<-read.table("cor-tjh.txt",header=T)
co1<-cor(d,method="spearman")
re<-corr.test(d,use="complete",method="pearson")
下面是结果:
Call:corr.test(x = d, use = "complete", method = "pearson")
Correlation matrix
longitude latitude Elevation BIO1 BIO4 BIO4.2 BIO12 BIO15 NPPmean NDVImean AET.mm.yr. PET.mm.yr. ntaxa
longitude 1.00 -0.56 -0.81 0.78 0.75 0.74 -0.89 0.69 -0.61 0.86 -0.02 -0.88 0.84
latitude -0.56 1.00 0.93 -0.94 -0.97 -0.97 0.76 -0.98 0.40 -0.17 -0.78 0.86 -0.68
Elevation -0.81 0.93 1.00 -1.00 -0.99 -0.99 0.94 -0.97 0.64 -0.52 -0.49 0.99 -0.83
BIO1 0.78 -0.94 -1.00 1.00 1.00 0.99 -0.93 0.99 -0.59 0.49 0.55 -0.98 0.86
BIO4 0.75 -0.97 -0.99 1.00 1.00 1.00 -0.90 0.99 -0.56 0.41 0.60 -0.96 0.81
BIO4.2 0.74 -0.97 -0.99 0.99 1.00 1.00 -0.89 0.99 -0.55 0.40 0.61 -0.96 0.80
BIO12 -0.89 0.76 0.94 -0.93 -0.90 -0.89 1.00 -0.88 0.76 -0.75 -0.23 0.97 -0.92
BIO15 0.69 -0.98 -0.97 0.99 0.99 0.99 -0.88 1.00 -0.50 0.36 0.66 -0.94 0.82
NPPmean -0.61 0.40 0.64 -0.59 -0.56 -0.55 0.76 -0.50 1.00 -0.71 0.15 0.70 -0.50
NDVImean 0.86 -0.17 -0.52 0.49 0.41 0.40 -0.75 0.36 -0.71 1.00 -0.45 -0.64 0.71
AET.mm.yr. -0.02 -0.78 -0.49 0.55 0.60 0.61 -0.23 0.66 0.15 -0.45 1.00 -0.36 0.27
PET.mm.yr. -0.88 0.86 0.99 -0.98 -0.96 -0.96 0.97 -0.94 0.70 -0.64 -0.36 1.00 -0.85
ntaxa 0.84 -0.68 -0.83 0.86 0.81 0.80 -0.92 0.82 -0.50 0.71 0.27 -0.85 1.00
Sample Size
[1] 5
Probability values (Entries above the diagonal are adjusted for multiple tests.)
longitude latitude Elevation BIO1 BIO4 BIO4.2 BIO12 BIO15 NPPmean NDVImean AET.mm.yr. PET.mm.yr. ntaxa
longitude 0.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1
latitude 0.32 0.00 1.00 1.00 0.46 0.41 1.00 0.28 1.00 1.00 1.00 1.00 1
Elevation 0.09 0.02 0.00 0.03 0.07 0.09 1.00 0.34 1.00 1.00 1.00 0.08 1
BIO1 0.12 0.02 0.00 0.00 0.03 0.04 1.00 0.10 1.00 1.00 1.00 0.28 1
BIO4 0.15 0.01 0.00 0.00 0.00 0.00 1.00 0.05 1.00 1.00 1.00 0.51 1
BIO4.2 0.15 0.01 0.00 0.00 0.00 0.00 1.00 0.04 1.00 1.00 1.00 0.58 1
BIO12 0.05 0.13 0.02 0.02 0.04 0.04 0.00 1.00 1.00 1.00 1.00 0.43 1
BIO15 0.19 0.00 0.01 0.00 0.00 0.00 0.05 0.00 1.00 1.00 1.00 1.00 1
NPPmean 0.28 0.50 0.25 0.29 0.32 0.33 0.14 0.39 0.00 1.00 1.00 1.00 1
NDVImean 0.06 0.79 0.36 0.40 0.49 0.50 0.14 0.55 0.18 0.00 1.00 1.00 1
AET.mm.yr. 0.97 0.12 0.40 0.34 0.28 0.27 0.71 0.22 0.80 0.45 0.00 1.00 1
PET.mm.yr. 0.05 0.06 0.00 0.00 0.01 0.01 0.01 0.02 0.19 0.25 0.55 0.00 1
ntaxa 0.08 0.21 0.08 0.06 0.10 0.10 0.03 0.09 0.39 0.18 0.66 0.06 0
To see confidence intervals of the correlations, print with the short=FALSE option
我想请教各位大虾,为什么对称矩阵两侧,相同一对因子之间的相关系数是一样的,显著性却为什么不同呢(结果中表2) :plain: :-) :devil: :cry: :cry: