kappa2n {GeneTS}R Documentation

Relationship Between Sample Size and the Degree of Freedom of Correlation Distribution

Description

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.

Usage

kappa2n(kappa, p=2)
n2kappa(n, p=2)

Arguments

kappa degree of freedom
p number of variables (p=2 corresponds to simple correlation)
n sample size

Details

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).

Value

The sample size n corresponding to a given kappa, or the degree of freedom kappa corresponding to a given p.

Author(s)

Juliane Schaefer (http://www.stat.math.ethz.ch/~schaefer/) and Korbinian Strimmer (http://www.statistik.lmu.de/~strimmer/).

See Also

dcor0.

Examples

# 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)

[Package GeneTS version 2.10.1 Index]