cmat.star {OrdNor} | R Documentation |
Computes the correlation of intermediate multivariate normal data before subsequent ordinalization
Description
The function computes an intermediate correlation matrix which leads to the target correlation matrix after ordinalization of the samples generated from a multivariate normal distribution with the intermediate correlation matrix.
Usage
cmat.star(plist, CorrMat, no.ord, no.norm)
Arguments
plist |
A list of probability vectors corresponding to each ordinal variable. The i-th element of |
CorrMat |
The target correlation matrix which must be positive definite and within the valid limits. |
no.ord |
Number of ordinal variables in the data. |
no.norm |
Number of normal variables in the data. |
Value
An intermediate correlation matrix of size (no.ord + no.norm) \times (no.ord + no.norm)
See Also
Examples
Sigma = diag(4)
Sigma[lower.tri(Sigma)] = c(0.42, 0.78, 0.29, 0.37, 0.14, 0.26)
Sigma = Sigma + t(Sigma)
diag(Sigma)=1
marginal = list( c(0.2, 0.5), c(0.4, 0.7, 0.9))
cmat.star(marginal, Sigma, 2, 2)