# density_joint: Joint density of X and Y In CopulaRegression: Bivariate Copula Based Regression Models

## Description

Density of a Gamma distributed variable X and a (zero-truncated) Poisson variable Y if their joint distribution is defined via a copula

## Usage

 1 density_joint(x, y, mu, delta, lambda, theta, family,zt) 

## Arguments

 x vector at which the density is evaluated y vector at which the density is evaluated 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 zt logical. If zt=TRUE, we use a zero-truncated Poisson variable. Otherwise, we use a Poisson variable. Default is TRUE.

## Details

For a Gamma distributed variable X and a (zero truncated) Possion variable Y, their joint density function is given by

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.

## Note

We allow two options: If mu and lambda are vectors of the same length as x and y, we evaluate the density for the corresponding parameter values. Otherwise, lambda and nu have to be numbers, and the parameters are the same for all entries of x and y.

Nicole Kraemer

## References

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_conditional, D_u
 1 out<-density_joint(2,3,mu=1,delta=1,lambda=4,theta=0.5,family=1)