density_conditional: Conditional density of Y given X

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/density_conditional.R

Description

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

Usage

1
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.

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.

Value

vector of length length(y)

Author(s)

Nicole Kraemer, Daniel Silvestrini

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

1
2
3
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)

CopulaRegression documentation built on May 29, 2017, 5:47 p.m.