CopulaRegression (version 0.1-5)

density_conditional: Conditional density of Y given X

Description

Conditional density of a (zero-truncated) Poisson variable Y given X=x for a Gamma-distributed variable X.

Usage

density_conditional(y,x, mu, delta, lambda, theta, family,zt)

Arguments

y
vector at which the conditional density is evaluated
x
conditioning value of the Gamma distributed variable
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.

Value

  • vector of length length(y)

Details

For a Gamma distributed variable X and a (zero truncated) Possion variable Y with joint density function $f_{XY}(x,y)$, this function evaluates $$P(Y=y|X=x)=\frac{f_{XY}(x,y)}{f_X(x)}\,.$$ The joint density function is determined by a copula famila family with copula parameter theta.

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.

See Also

density_joint

Examples

Run this code
out<-density_conditional(y=0:10,x=3,mu=1,delta=1,lambda=2,theta=0.5,family=1)
names(out)=0:10
barplot(out)

Run the code above in your browser using DataCamp Workspace