Trivariate_LSDsim {trawl}R Documentation

Simulates from the trivariate logarithmic series distribution

Description

Simulates from the trivariate logarithmic series distribution

Usage

Trivariate_LSDsim(N, p1, p2, p3)

Arguments

N

number of data points to be simulated

p1

parameter p1p1 of the trivariate logarithmic series distribution

p2

parameter p2p2 of the trivariate logarithmic series distribution

p3

parameter p3p3 of the trivariate logarithmic series distribution

Details

The probability mass function of a random vector X=(X1,X2,X3)X=(X_1,X_2,X_3)' following the trivariate logarithmic series distribution with parameters 0<p1,p2,p3<10<p_1, p_2, p_3<1 with p:=p1+p2+p3<1p:=p_1+p_2+p_3<1 is given by

P(X1=x1,X2=x2,X3=x3)=Γ(x1+x2+x3)x1!x2!x3!p1x1p2x2p3x3(log(1p)),P(X_1=x_1,X_2=x_2,X_3=x_3)=\frac{\Gamma(x_1+x_2+x_3)}{x_1!x_2!x_3!} \frac{p_1^{x_1}p_2^{x_2}p_3^{x_3}}{(-\log(1-p))},

for x1,x2,x3=0,1,2,x_1,x_2,x_3=0,1,2,\dots such that x1+x2+x3>0x_1+x_2+x_3>0.

The simulation proceeds in two steps: First, X1X_1 is simulated from the modified logarithmic distribution with parameters p~1=p1/(1p2p3)\tilde p_1=p_1/(1-p_2-p_3) and δ1=log(1p2p3)/log(1p)\delta_1=\log(1-p_2-p_3)/\log(1-p). Then we simulate (X2,X3)(X_2,X_3)' conditional on X1X_1. We note that (X2,X3)X1=x1(X_2,X_3)'|X_1=x_1 follows the bivariate logarithmic series distribution with parameters (p2,p3)(p_2,p_3) when x1=0x_1=0, and the bivariate negative binomial distribution with parameters (x1,p2,p3)(x_1,p_2,p_3) when x1>0x_1>0.

Value

An N×3N \times 3 matrix with NN simulated values from the trivariate logarithmic series distribution


[Package trawl version 0.2.2 Index]