Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/simulate_joint.R
Simulation from the joint model
1 | simulate_joint(n, mu, delta, lambda, theta, family, max.y = 5000, eps = 1e-05,zt=TRUE)
|
n |
number of samples |
mu |
expectation of the Gamma distribution |
delta |
dispersion parameter of the Gamma distribution |
lambda |
parameter of the (zero-truncated) Poisson distribution |
theta |
copula parameter |
family |
an integer defining the bivariate copula family: 1 = Gauss, 3 = Clayton, 4=Gumbel, 5=Frank |
max.y |
upper value for the conditional (zero truncated) Poisson variable, see below for more details |
eps |
precision, see below for more details |
zt |
logical. If |
For a Gamma distributed variable X and a (zero truncated) Possion variable Y, we sample from their joint distribution that is given by the density function
f_{XY}(x,y)=f_X(x) ≤ft(D_u(F_Y(y),F_X(x)|θ) - D_u(F_Y(y-1),F_X(x)|θ) \right)\,.
Here D_u is the h-function of a copula famila family
with copula parameter theta
. First, we sample n observations x
from the marginal Gamma distribution. Second, for each x, we then sample an observation from the conditional distribution of Y given X=x. In the second step, the conditional distribution is evaluated up to the maximum of max.y
and the smallest integer > y.max
for which the conditional probability is smaller than eps
.
n samples, stored in a n \times 2 matrix
Nicole Kraemer
N. Kraemer, E. Brechmann, D. Silvestrini, C. Czado (2013): Total loss estimation using copula-based regression models. Insurance: Mathematics and Economics 53 (3), 829 - 839.
density_joint
, simulate_regression_data
,density_conditional
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.