ValidCorrGpois {RNGforGPD}R Documentation

Validates Pairwise Correlations

Description

ValidCorrGpois checks the validity of the values of pairwise correlations including positive definiteness, symmetry, and correctness of the dimensions.

Usage

ValidCorrGpois(corMat, theta.vec, lambda.vec, verbose = TRUE)

Arguments

corMat

a positive definite target correlation matrix whose entries are within the valid correlation bounds.

theta.vec

rate parameters in the generalized Poisson distribution. It is assumed that the length of the vector is at least two, and each value has to be a positive number.

lambda.vec

dispersion parameters in the generalized Poisson distribution. It is assumed that the length of the vector is at least two. All lambda values have to be less than 1. For lambda < 0, lambda must be greater than or equal to -theta/4.

verbose

logical variable that determines whether to display the traces. Default is set to TRUE.

Value

TRUE or FALSE.

References

Amatya, A. and Demirtas, H. (2017). PoisNor: An R package for generation of multivariate data with Poisson and normal marginals. Communications in Statistics - Simulation and Computation, 46(3), 2241-2253.

Demirtas, H. and Hedeker, D. (2011). A practical way for computing approximate lower and upper correlation bounds. The American Statistician, 65(2), 104-109.

Examples


 ValidCorrGpois(matrix(c(1, 0.9, 0.9, 1), byrow = TRUE, nrow = 2), 
                c(0.5, 0.5), c(0.1, 0.105), verbose = TRUE)
 ValidCorrGpois(matrix(c(1, 0.9, 0.9, 1), byrow = TRUE, nrow = 2), 
                c(3, 2), c(-0.3, -0.2), verbose = TRUE)

[Package RNGforGPD version 1.1.0 Index]