# Bivariate_NBsim: Simulates from the bivariate negative binomial distribution In trawl: Estimation and Simulation of Trawl Processes

## Description

Simulates from the bivariate negative binomial distribution

## Usage

 1 Bivariate_NBsim(N, kappa, p1, p2) 

## Arguments

 N number of data points to be simulated kappa parameter κ of the bivariate negative binomial distribution p1 parameter p_1 of the bivariate negative binomial distribution p2 parameter p_2 of the bivariate negative binomial distribution

## Details

A random vector {\bf X}=(X_1,X_2)' is said to follow the bivariate negative binomial distribution with parameters κ, p_1, p_2 if its probability mass function is given by

P({\bf X}={\bf x})=\frac{Γ(x_1+x_2+κ)}{x_1!x_2! Γ(κ)}p_1^{x_1}p_2^{x_2}(1-p_1-p_2)^{κ},

where, for i=1,2, x_i\in\{0,1,…\}, 0<p_i<1 such that p_1+p_2<1 and κ>0.

## Value

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

## Examples

 1 2 3 4 5 6 7 set.seed(1) kappa <- 3 p1 <- 0.1 p2 <- 0.85 N <- 100 #Simulate N realisations from the bivariate negative binomial distribution y <- Bivariate_NBsim(N,kappa,p1,p2) 

trawl documentation built on Aug. 16, 2018, 5:04 p.m.