Description Usage Arguments Details Value Author(s) References See Also Examples
Loglikelihood of the joint regression model
1 | loglik_joint(alpha,beta,theta, delta, x, y, R, S, family, exposure, negative,zt)
|
alpha |
The regression coefficients for the Gamma regression |
beta |
The regression coefficients for the (zero-truncated) Poisson regression |
theta |
The copula parameter |
delta |
dispersion parameter of the Gamma distribution |
x |
n observations of the Gamma variable |
y |
n observations of the zero-truncated Poisson variable |
R |
n x p design matrix for the Gamma model |
S |
n x q design matrix for the zero-truncated Poisson model |
family |
an integer defining the bivariate copula family: 1 = Gauss, 3 = Clayton, 4=Gumbel, 5=Frank |
exposure |
exposure time for the zero-truncated Poisson model, all entries of the vector have to be >0. Default is a constant vector of 1. |
negative |
boolean, if TRUE the negative of the loglikelihood is returned. Default is TRUE. |
zt |
logical. If |
For a Gamma distributed variable X and a (zero truncated) Possion variable Y, the loglikelihood is given by
\ell=∑_{i=1} ^n ≤ft(f_X(x_i) ≤ft(D_u(F_Y(y_i),F_X(x_i)|θ) - D_u(F_Y(y_i -1),F_X(x_i)|θ) \right)\right)\,.
Here D_u is the h-function of a copula famila family
with copula parameter theta
.
loglikelihood
Nicole Kraemer, Daniel Silvestrini
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(VineCopula)
n<-200 # number of examples
R<-S<-cbind(rep(1,n),rnorm(n)) # design matrices with intercept
alpha<-beta<-c(1,-1) # regression coefficients
exposure<-rep(1,n) # constant exposure
delta<-0.5 # dispersion parameter
tau<-0.3 # Kendall's tau
family=3 # Clayton copula
theta<-BiCopTau2Par(tau=tau,family=family)
# simulate data
my.data<-simulate_regression_data(n,alpha,beta,R,S,delta,tau,family,TRUE,exposure)
x<-my.data[,1]
y<-my.data[,2]
#compute loglikelihood for the true coefficients
out<-loglik_joint(alpha,beta,theta,delta,x,y,R,S,family,exposure)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.