Description Usage Arguments Details Value
View source: R/SimulateDiscreteDistributions.R
Simulates from the trivariate logarithmic series distribution
1 | Trivariate_LSDsim(N, p1, p2, p3)
|
N |
number of data points to be simulated |
p1 |
parameter p1 of the trivariate logarithmic series distribution |
p2 |
parameter p2 of the trivariate logarithmic series distribution |
p3 |
parameter p3 of the trivariate logarithmic series distribution |
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{Γ(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,… 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 δ_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.
An N \times 3 matrix with N simulated values from the trivariate logarithmic series distribution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.