intermediate.corr.BB: Computes an intermediate normal correlation matrix for binary...

Description Usage Arguments Value References See Also Examples

View source: R/intermediate.corr.BB.R

Description

Computes an intermediate normal correlation matrix for binary variables before dichotomization given the specified correlation matrix.

Usage

1
intermediate.corr.BB(n.P, n.B, n.C, prop.vec, corr.vec = NULL, corr.mat = NULL)

Arguments

n.P

Number of Poisson variables.

n.B

Number of binary variables.

n.C

Number of continuous variables.

prop.vec

Proportion vector for binary variables.

corr.vec

Vector of elements below the diagonal of correlation matrix ordered column-wise.

corr.mat

Specified correlation matrix.

Value

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

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

intermediate.corr.PB, intermediate.corr.BC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
n.P<-2
n.B<-2
n.C<-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)

intmatBB=intermediate.corr.BB(n.P,n.B,n.C,prop.vec,corr.vec=NULL,corr.mat)
intmatBB

## End(Not run)

PoisBinNonNor documentation built on March 22, 2021, 9:07 a.m.