Description Usage Arguments Value Examples
calculate the Spearman correlation for a 2 dimensional contingency table.
1 | spearmanR(P)
|
P |
a 2 dimensional contingency table. |
the Spearman correlation value (r) for the observed data.
1 2 3 4 5 6 7 8 9 10 11 12 | data(table4);
#fit an empirical correlation
mySR <- spearmanR(table4);
(boot(mySR));
#example with a dataframe:
mydf <- data.frame(W=rbinom(100,1,.5), X=rbinom(100,2,.5), Y=rbinom(100,3,.5),
Z=rbinom(100,4,.5));
myMC <- corrMatrix(mydf,method="spearman");
#results should be exactly identical to:
cor(mydf,method="spearman")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.