overall.corr.mat: Computes the final intermediate correlation matrix

Description Usage Arguments Value See Also Examples

View source: R/overall.corr.mat.R

Description

This function computes the final correlation matrix by combining pairwise intermediate correlation matrix entries for Poisson-Poisson, Poisson-binary, Poisson-continuous, binary-binary, binary-continuous, and continuous-continuous combinations. If the resulting correlation matrix is not positive definite, a nearest positive matrix will be used.

Usage

1
2
overall.corr.mat(n.P, n.B, n.C, lambda.vec = NULL, prop.vec = NULL, coef.mat = NULL, 
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.

lambda.vec

Rate vector for Poisson variables.

prop.vec

Proportion vector for binary variables.

coef.mat

Matrix of coefficients produced from fleishman.coef.

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.P+N.B+n.C)*(n.P+N.B+n.C).

See Also

intermediate.corr.PP, intermediate.corr.BB, intermediate.corr.CC,

intermediate.corr.PB, intermediate.corr.PC, intermediate.corr.BC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
n.P<-1
n.B<-1
n.C<-1
lambda.vec<-c(1)
prop.vec<-c(0.3)
coef.mat<-matrix(c(0,1,0,0),4,1)
corr.vec=NULL
corr.mat=matrix(c(1,0.2,0.1,0.2,1,0.5,0.1,0.5,1),3,3)

finalmat=overall.corr.mat(n.P,n.B,n.C,lambda.vec,prop.vec,coef.mat, 
corr.vec=NULL,corr.mat)
finalmat

## End(Not run)

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