kappa2N {GeneTS} | R Documentation |

## Determine the Sample Size from the Degree of Freedom of Correlation Distribution

### Description

The degree of freedom kappa of the sample distribution of the correlation
coefficient depends both on the sample size N and the number G of investigated variables,
i.e. whether simple or partial correlation coefficients are being considered.
For G=2 (simple correlation coefficient) the degree of freedom equals kappa = N-1,
whereas for arbitrary G (with G-2 variables eliminated in the partial correlation coefficient)
kappa = N-G+1 (see also `dcor0`

).

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, G=2)
N2kappa(N, G=2)

### Arguments

`kappa` |
degree of freedom |

`G` |
number of variables (G=2 corresponds to simple correlation) |

`N` |
sample size |

### Value

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

### Author(s)

Juliane Schaefer (http://www.stat.uni-muenchen.de/~schaefer/) and
Korbinian Strimmer (http://www.stat.uni-muenchen.de/~strimmer/).

### See Also

`dcor0`

, `cor0.estimate.kappa`

.

### Examples

# load GeneTS library
library(GeneTS)
# sample sizes corresponding to kappa=7
kappa2N(7) # simple correlation
kappa2N(7, 40) # partial correlation with 40 variables
# degree of freedom corresponding to N=100
N2kappa(100)
N2kappa(100,40)

[Package

*GeneTS* version 2.3

Index]