CmatStarGpois {RNGforGPD} | R Documentation |
Computes Intermediate Correlation Matrix
Description
CmatStarGpois
computes an intermediate correlation matrix that will be used to obtain
the target correlation matrix using the inverse CDF transformation method in GenMVGpois
.
If the intermediate correlation matrix is not positive definite, the nearest positive definite
matrix is used.
Usage
CmatStarGpois(corMat, theta.vec, lambda.vec, verbose = TRUE)
Arguments
corMat |
target correlation matrix. |
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
Intermediate correlation matrix.
References
Yahav, I. and Shmueli, G. (2012). On generating multivariate Poisson data in management science applications. Applied Stochastic Models in Business and Industry, 28(1), 91-102.
Examples
lambda.vec = c(-0.2, 0.2, -0.3)
theta.vec = c(1, 3, 4)
M = c(0.352, 0.265, 0.342)
N = diag(3)
N[lower.tri(N)] = M
TV = N + t(N)
diag(TV) = 1
cstar = CmatStarGpois(TV, theta.vec, lambda.vec, verbose = TRUE)
cstar