| kappa2n {GeneTS} | R Documentation |
The function kappa2n returns the sample size that
corresponds to a given degree of freedom kappa, whereas n2kappa
converts sample size to the corresponding degree of freedom.
kappa2n(kappa, p=2) n2kappa(n, p=2)
kappa |
degree of freedom |
p |
number of variables (p=2 corresponds to simple correlation) |
n |
sample size |
The degree of freedom kappa of the sample distribution of the empirical correlation
coefficient depends both on the sample size n and the number p of investigated variables,
i.e. whether simple or partial correlation coefficients are being considered.
For p=2 (simple correlation coefficient) the degree of freedom equals kappa = n-1,
whereas for arbitrary p (with p-2 variables eliminated in the partial correlation coefficient)
kappa = n-p+1 (see also dcor0).
The sample size n corresponding to a given kappa, or the degree of freedom kappa corresponding to a given p.
Juliane Schaefer (http://www.stat.math.ethz.ch/~schaefer/) and Korbinian Strimmer (http://www.statistik.lmu.de/~strimmer/).
# load GeneTS library
library("GeneTS")
# sample sizes corresponding to kappa=7
kappa2n(7) # simple correlation
kappa2n(7, 40) # partial correlation with p=40 variables
# degree of freedom corresponding to n=100
n2kappa(100)
n2kappa(100,40)