validate.target.cormat: Checks the target correlation matrix

Description Usage Arguments Details Examples

View source: R/validate.target.cormat.R

Description

The function checks the validity of the values of pairwise correlations. Additionally, it checks positive definitiveness, symmetry and correct dimension.

Usage

1
validate.target.cormat(plist, CorrMat, no.ord, no.norm)

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.

CorrMat

The target correlation matrix which must be positive definite and within the valid limits.

no.ord

Number of ordinal variables.

no.norm

Number of normal variables.

Details

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 ordinal 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.

Examples

1
2
3
4
5
6
7
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))
validate.target.cormat(marginal, Sigma, 2,2)

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