Description Usage Arguments Details Value Author(s) References See Also Examples
This functions fits a joint, bivariate regression model for a Gamma generalized linear model and a (zero-truncated) Poisson generalized linear model.
1 |
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. |
sd.error |
logical. Should the standard errors of the regression
coefficients be returned? Default is |
joint |
logical.
Should the two generalized liner models be estimated jointly? Default is
|
zt |
logical. If |
We consider positive continuous random variables X_i and positive or non-negative count variables Y_i. We model X_i in terms of a covariate vector r_i and Y_i in terms of a covariate vector s_i. The marginal regression models are specified via
X_i\sim Gamma(μ_i,δ)
with \ln(μ_i)={ r_i}
^\top α
for the continuous variable. For the count variable, if zt=TRUE
, we use a zero-truncated Poisson model,
Y_i\sim ZTP(λ_{i})
with \ln(λ_{i})=\ln(e_i)+{s_i}^\top β. Otherwise, we use a Poisson model. e_i denotes the exposure time.
Further, mwe assume that the dependency of X_i and Y_i is modeled in terms of a copula family with parameter θ.
This is an object of class copreg
alpha |
estimated coefficients for X, including the intercept |
beta |
estimated coefficients for Y, including the intercept |
sd.alpha |
estimated standard deviation of |
sd.beta |
estimated standard deviation of |
delta |
estimated dispersion parameter |
theta |
estimated copula parameter if |
family |
copula family as provided in the function call if |
ll |
loglikelihood of the estimated model, evaluated at each observation |
loglik |
overall loglikelihood, i.e. sum of |
alpha0 |
estimated coefficients for X under independence, including the intercept |
beta0 |
estimated coefficients for Y under independence, including the intercept |
sd.alpha0 |
estimated standard deviation (if |
sd.beta0 |
estimated standard deviation (if |
delta0 |
estimated dispersion parameter under independence |
theta0 |
0 (in combination with |
family0 |
1 (in combination with |
ll0 |
loglikelihood of the estimated model under independence, evaluated at each observation |
loglik0 |
overall loglikelihood, under independence, i.e. sum of |
zt |
The value of |
tau_IFM |
estimated Kendall's τ based on the marginal models, using inference from margins |
theta_ifm |
estimated copula parameter, estimated via inference from margins |
npar |
the number of estimated parameters in the model |
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.
mle_marginal
,mle_joint
,
simulate_regression_data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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
# 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]
# joint model without standard errors
my.model<-copreg(x,y,R,S,family,exposure,FALSE,TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.