GenMVGpois {RNGforGPD}R Documentation

Generates Data from Multivariate Generalized Poisson Distribution

Description

GenMVGpois simulates a sample of size sample.size from a set of multivariate generalized Poisson variables with correlation matrix cmat.star and pre-specified marginals.

Usage

GenMVGpois(
  sample.size,
  no.gpois,
  cmat.star,
  theta.vec,
  lambda.vec,
  details = TRUE
)

Arguments

sample.size

desired sample size (number of rows) for the multivariate generalized Poisson data

no.gpois

dimension of the multivariate generalized Poisson distribution.

cmat.star

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

details

index of whether to display the specified and empirical values of parameters. Default is set to TRUE.

Value

Data that follow multivariate generalized Poisson distribution.

References

Amatya, A. and Demirtas, H. (2015). Simultaneous generation of multivariate mixed data with Poisson and normal marginals. Journal of Statistical Computation and Simulation, 85(15), 3129-3139.

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. (2017). On accurate and precise generation of generalized Poisson variates. Communications in Statistics - Simulation and Computation, 46(1), 489-499.

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


 sample.size = 10000; no.gpois = 3
 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)
 data = GenMVGpois(sample.size, no.gpois, cstar, theta.vec, lambda.vec, details = FALSE)
 apply(data, 2, mean) # empirical means
 theta.vec/(1 - lambda.vec) # theoretical means
 apply(data, 2, var) # empirical variances
 theta.vec/(1 - lambda.vec)^3 # theoretical variances
 cor(data) # empirical correlation matrix
 TV # specified correlation matrix

[Package RNGforGPD version 1.1.0 Index]