Description Usage Arguments Details Value
View source: R/SimulateDiscreteDistributions.R
Simulates from the bivariate logarithmic series distribution
1 | Bivariate_LSDsim(N, p1, p2)
|
N |
number of data points to be simulated |
p1 |
parameter p_1 of the bivariate logarithmic series distribution |
p2 |
parameter p_2 of the bivariate logarithmic series distribution |
The probability mass function of a random vector X=(X_1,X_2)' following the bivariate logarithmic series distribution with parameters 0<p_1, p_2<1 with p:=p_1+p_2<1 is given by
P(X_1=x_1,X_2=x_2)=\frac{Γ(x_1+x_2)}{x_1!x_2!} \frac{p_1^{x_1}p_2^{x_2}}{(-\log(1-p))},
for x_1,x_2=0,1,2,… such that x_1+x_2>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) and δ_1=\log(1-p_2)/\log(1-p). Then we simulate X_2 conditional on X_1. We note that X_2|X_1=x_1 follows the logarithmic series distribution with parameter p_2 when x_1=0, and the negative binomial distribution with parameters (x_1,p_2) when x_1>0.
An N \times 2 matrix with N simulated values from the bivariate logarithmic series distribution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.