Tetra.Corr.BB: Computes the tetrachoric correlation matrix for binary...

Description Usage Arguments Value References See Also Examples

View source: R/Tetra.Corr.BB.R

Description

This function computes the tetrachoric correlation matrix for binary-binary combinations as formulated in Demirtas et al. (2012).

Usage

1
Tetra.Corr.BB(n.BB, prop.vec, corr.vec = NULL, corr.mat = NULL)

Arguments

n.BB

Number of binary variables.

prop.vec

Probability vector for binary variables.

corr.vec

Vector of elements below the diagonal of correlation matrix ordered columnwise.

corr.mat

Specified correlation matrix.

Value

A correlation matrix of size n.BB*n.BB.

References

Demirtas, H., Hedeker, D., and Mermelstein, R.J. (2012). Simulation of massive public health data by power polynomials. Statistics in Medicine, 31(27), 3337-3346.

See Also

Tetra.Corr.BB, Biserial.Corr.BN, overall.corr.mat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n.BB=2
prop.vec=c(0.4,0.7)
corr.vec=NULL
corr.mat=matrix(c(1.0,-0.3,-0.3,-0.3,-0.3,-0.3,
-0.3,1.0,-0.3,-0.3,-0.3,-0.3,
-0.3,-0.3,1.0,0.4,0.5,0.6,
-0.3,-0.3,0.4,1.0,0.7,0.8,
-0.3,-0.3,0.5,0.7,1.0,0.9,
-0.3,-0.3,0.6,0.8,0.9,1.0),6,by=TRUE)

tetcor.mat=Tetra.Corr.BB(n.BB,prop.vec,corr.vec=NULL,corr.mat)

BinNonNor documentation built on March 22, 2021, 9:08 a.m.