compute.sigma.star {BinNor}R Documentation

Computes intermediate correlation matrix

Description

This function computes the intermediate correlation matrix by assembling tetrachoric correlations for binary-binary combinations, biserial correlations for binary-normal combinations, and specified correlation for normal-normal combinations. If the resulting correlation matrix is not positive definite, a nearest positive matrix will be used.

Usage

compute.sigma.star(no.bin, no.nor, prop.vec.bin = NULL,
		 corr.vec = NULL, corr.mat = NULL)

Arguments

no.bin

Number of binary variables

no.nor

Number of normal variables

prop.vec.bin

Probability vector for binary variables

corr.vec

Vector of elements below the diagonal of correlation matrix ordered columnwise

corr.mat

Specified correlation matrix

Value

sigma_star

A resulting intermediate correlation matrix Σ^*

nonPD

If a resulting intermediate correlation matrix is non-positive definite, it is stored in this value. Otherwise it is NULL.

PD

TRUE if Σ^* is positive definite, FALSE otherwise. A FALSE indicates that the nearest positive definite matrix is returned.

eigenv

Eigenvalues of the Σ^* before the conversion

See Also

validation.corr, nearPD, phi2tetra, is.positive.definite,
jointly.generate.binary.normal, simulation

Examples

cmat = lower.tri.to.corr.mat(corr.vec= c(0.16, 0.04, 0.38, 0.14, 0.47, 0.68),4)
compute.sigma.star(no.bin=2, no.nor=2, prop.vec.bin=c(0.4,0.7), 
corr.vec=NULL,corr.mat=cmat)

[Package BinNor version 2.3.3 Index]