IntermediateOO: Computes intermediate correlations for ordinal-ordinal pairs...

Description Usage Arguments Value See Also Examples

View source: R/IntermediateOO.R

Description

This function computes the correlation of normal-normal pairs before ordinalizing both components.

Usage

1
IntermediateOO(plist, OOCorrMat)

Arguments

plist

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.

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

IntermediateON, cmat.star

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
	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)

OrdNor documentation built on March 6, 2021, 1:08 a.m.