validate.target.cormat.BinOrdNN {BinOrdNonNor} | R Documentation |
Checks the validity of the target correlation matrix
Description
The function checks the validity of pairwise correlations. In addition, it checks positive definiteness, symmetry, and correct dimensions.
Usage
validate.target.cormat.BinOrdNN(plist, skew.vec, kurto.vec, no.bin, no.ord,
no.NN, CorrMat)
Arguments
plist |
A list of probability vectors corresponding to each binary/ordinal variable. The i-th element of |
skew.vec |
The skewness vector for continuous variables. |
kurto.vec |
The kurtosis vector for continuous variables. |
no.bin |
Number of binary variables. |
no.ord |
Number of ordinal variables. |
no.NN |
Number of continuous variables. |
CorrMat |
The target correlation matrix which must be positive definite and within the valid limits. |
Value
In addition to being positive definite and symmetric, the values of pairwise correlations in the target correlation matrix must also fall within the limits imposed by the marginal distributions of the variables. The function ensures that the supplied correlation matrix is valid for simulation. If a violation occurs, an error message is displayed that identifies the violation. The function returns a logical value TRUE
when no such violation occurs.
See Also
Examples
Sigma <- diag(4)
Sigma[lower.tri(Sigma)] <- c(0.42, 0.55, 0.29, 0.37, 0.14, 0.26)
Sigma <- Sigma + t(Sigma)
diag(Sigma) <- 1
marginal <- list(0.2, c(0.4, 0.7, 0.9))
validate.target.cormat.BinOrdNN(plist=marginal, skew.vec=c(1,2), kurto.vec=c(2,7),
no.bin=1, no.ord=1, no.NN=2, CorrMat=Sigma)