corr_test(x, y, alternative = "greater", measure = "pearson",
method_p = "sampling", samplenum = 1000, conf.level.sample = 0.95)
Arguments
x
numeric vectors of data values and should have the same length
y
numeric vectors of data values and should have the same length
alternative
a character string specifying the alternative hypothesis, must be one of "two.sided", "greater"(default) or "less"
measure
the way to measure the correlation coefficient and must be one of "pearson", "spearman" or "kendall"
method_p
a string indicating what method to use for p-value. "sampling" represents sampling; "asymptotic" represents using large sample approximations
samplenum
the number of SRS samples
conf.level.sample
p-value confidence level for SRS sampling
Value
A list with following components
method
the test uesd
score
the score which is used
stat
the statistic of the data under the given scoring system
conf.int
the confidence interval for p-value(only if method_p = "sampling")
pval
p-value for the test
null.value
a character string describing the alternative hypothesis
Details
All procedures and methods of the correlation coefficient test based on the Spearman Correlation Coefficient are the same as for the Pearson Correlation Coefficient. But pay attention to that the correlation coefficient test based on Kendall Correlation Coefficient is a little different from the above two due to its definition.
References
Higgins, J. J. (2004). An introduction to modern nonparametric statistics. Pacific Grove, CA: Brooks/Cole.