cor.mat(K = 2, M = 0, n = 101, n0 = 143)
#$cormat
# [,1] [,2]
#[1,] 1.0000000 0.4139344
#[2,] 0.4139344 1.0000000
#
#$cor1
#[1] 0.4139344
#
#$cor2
#NULL
#
cor.mat(K = 2, M = 2, n = 107, n0 = 198, n0t = 43)
#$cormat
# [,1] [,2] [,3] [,4]
#[1,] 1.0000000 0.3508197 0.2746316 0.2746316
#[2,] 0.3508197 1.0000000 0.2746316 0.2746316
#[3,] 0.2746316 0.2746316 1.0000000 0.3508197
#[4,] 0.2746316 0.2746316 0.3508197 1.0000000
#
#$cor1
#[1] 0.3508197
#
#$cor2
#[1] 0.2746316
Run the code above in your browser using DataLab