IntermediateOO {OrdNor} | R Documentation |
Computes intermediate correlations for ordinal-ordinal pairs before ordinalization
Description
This function computes the correlation of normal-normal pairs before ordinalizing both components.
Usage
IntermediateOO(plist, OOCorrMat)
Arguments
plist |
A list of probability vectors corresponding to each ordinal variable. The i-th element of |
OOCorrMat |
A matrix of pairwise target correlations between ordinal variables. It is a symmetric square matrix whose diagonal elements are 1. |
Value
A pairwise correlation matrix of intermediate correlations for ordinal variables.
See Also
Examples
no.ord=3
no.norm =4
n = 200
q=no.ord + no.norm
set.seed(12345)
Sigma = diag(q)
Sigma[lower.tri(Sigma)] = runif( (q*(q-1)/2),-0.4,0.4 )
Sigma = Sigma + t(Sigma)
diag(Sigma)=1
Sigma=as.matrix( nearPD(Sigma,corr = TRUE, keepDiag = TRUE)$mat )
marginal = list( 0.3, cumsum( c(0.30, 0.40) ), cumsum(c(0.4, 0.2, 0.3) ) )
OOCorrMat = Sigma[1:3, 1:3]
IntermediateOO(marginal, OOCorrMat)
[Package OrdNor version 2.2.3 Index]