cmat.star: Computes the correlation of intermediate multivariate normal...

Description Usage Arguments Value References See Also Examples

View source: R/cmat.star.R

Description

The function computes an intermediate correlation matrix which leads to the target correlation matrix after inverse CDF transformation of the samples generated from a multivariate normal distribution with the intermediate correlation matrix.

Usage

1
cmat.star(no.pois, no.norm, corMat, lamvec)

Arguments

no.pois

Number of Poisson variables in the data.

no.norm

Number of normal variables in the data.

corMat

A positive definite target correlation matrix whose entries are within the valid limits.

lamvec

Vector of Poisson rates (means).

Value

An intermediate correlation matrix of size (no.pois + no.norm) \times (no.pois+ no.norm)

References

I. Yahav and G. Shmueli (2012). On generating multivariate poisson data in management science applications. Applied Stochastic Models in Business and Industry; 28(1):91-102.

See Also

Validate.correlation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
lamvec= c(0.5,0.7,0.9)
M=c(0.352, 0.265, 0.342, 0.09, 0.141, 0.121, 0.297, 
  -0.022, 0.177, 0.294, -0.044, 0.129, 0.1, 0.354, 0.386)

N=diag(6)
N[lower.tri(N)]=M
TV=N+t(N)
diag(TV)<-1

cstar = cmat.star(no.pois=3, no.norm=3, TV, lamvec)

## End(Not run)

PoisNor documentation built on March 22, 2021, 9:05 a.m.