Bivariate_NBsim function

Simulates from the bivariate negative binomial distribution

Simulates from the bivariate negative binomial distribution

Bivariate_NBsim(N, kappa, p1, p2)

Arguments

  • N: number of data points to be simulated
  • kappa: parameter κ\kappa of the bivariate negative binomial distribution
  • p1: parameter p1p_1 of the bivariate negative binomial distribution
  • p2: parameter p2p_2 of the bivariate negative binomial distribution

Returns

An N×2N\times 2 matrix with NN simulated values from the bivariate negative binomial distribution

Details

A random vector X=(X1,X2){\bf X}=(X_1,X_2)' is said to follow the bivariate negative binomial distribution with parameters c("kappa,p1,\n\\kappa, p_1,\n", "p2 p_2") if its probability mass function is given by

P(X=\bfx)=Γ(x1+x2+κ)x1!x2!Γ(κ)p1x1p2x2(1p1p2)κ, P({\bf X}={\bfx})=\frac{\Gamma(x_1+x_2+\kappa)}{x_1!x_2!\Gamma(\kappa)}p_1^{x_1}p_2^{x_2}(1-p_1-p_2)^{\kappa},

where, for i=1,2i=1,2, xi{0,1,}x_i\in\{0,1,\dots\}, 0<pi<10<p_i<1 such that p1+p2<1p_1+p_2<1 and κ>0\kappa>0.

  • Maintainer: Almut E. D. Veraart
  • License: GPL-3
  • Last published: 2021-02-22

Useful links