intermediate.corr.BB {PoisBinNonNor} | R Documentation |
Computes an intermediate normal correlation matrix for binary variables given the specified correlation matrix
Description
Computes an intermediate normal correlation matrix for binary variables before dichotomization given the specified correlation matrix.
Usage
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
## 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)
[Package PoisBinNonNor version 1.3.3 Index]