stat.cor | R Documentation |
This function is the first step in the process to create a correlation test in permuted data. For more details about correlation tests, see R documentation.
stat.cor(ant, var1, var2, method = "pearson", progress = TRUE)
ant |
an ant data object originating from permutations |
var1 |
an integer or string indicating the column in the data frames that corresponds to the first variable to correlate. This variable must be numerical. |
var2 |
an integer or string indicating the column in the data frames that corresponds to the second variable to correlate.This variable must be numerical. |
method |
a string vector indicating which type of correlation to perform:
|
progress |
a boolean indicating the visualization of the permutation process. |
Performs correlations tests in a data frame and extracts the t statistic.
a vector of 3 elements: the t statistic, the degree of freedom, and the estimate.
Sebastian Sosa, Ivan Puga-Gonzalez.
D. J. Best & D. E. Roberts (1975), Algorithm AS 89: The Upper Tail Probabilities of Spearman's rho. Applied Statistics, 24, 377-379.
Myles Hollander & Douglas A. Wolfe (1973), Nonparametric Statistical Methods. New York: John Wiley & Sons. Pages 185-194 (Kendall and Spearman tests).
t=met.strength(sim.m,sim.df,1) # Computing network metric
t=perm.net.nl(t,labels='age',rf=NULL,nperm=10,progress=FALSE) # Node label permutations
r.c=stat.cor(t,'age','strength',progress=FALSE) # Permuted correlation test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.