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 |
p2 |
parameter |
p3 |
parameter |
Details
The probability mass function of a random vector
X=(X_1,X_2,X_3)'
following the trivariate logarithmic series
distribution with parameters 0<p_1, p_2, p_3<1
with
p:=p_1+p_2+p_3<1
is given by
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
x_1,x_2,x_3=0,1,2,\dots
such that x_1+x_2+x_3>0
.
The simulation proceeds in two steps: First, X_1
is simulated from the
modified logarithmic distribution with parameters \tilde
p_1=p_1/(1-p_2-p_3)
and \delta_1=\log(1-p_2-p_3)/\log(1-p)
. Then we
simulate (X_2,X_3)'
conditional on X_1
. We note that
(X_2,X_3)'|X_1=x_1
follows the bivariate logarithmic series
distribution with parameters (p_2,p_3)
when x_1=0
, and the
bivariate negative binomial distribution with parameters (x_1,p_2,p_3)
when x_1>0
.
Value
An N \times 3
matrix with N
simulated values from the
trivariate logarithmic series distribution