Last chance! 50% off unlimited learning
Sale ends in
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.
cmat.star(plist, CorrMat, no.ord, no.norm)
A list of probability vectors corresponding to each ordinal variable. The i-th element of plist
is a vector of the cumulative probabilities defining the marginal distribution of the i-th ordinal component of the multivariate variables. If the i-th ordinal variable has k categories, the i-th vector of the plist
will contain k-1 probability values. The k-th element is implicitly 1.
The target correlation matrix which must be positive definite and within the valid limits.
Number of ordinal variables in the data.
Number of normal variables in the data.
An intermediate correlation matrix of size
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab