MGL.mle.mixed: Fitting bivariate MGL copula models for mixed data

Description Usage Arguments Details Value Examples

View source: R/MGL-mle-mixed.r

Description

MGL.mle.mixed is used to fit bivariate mixed copula regression models via maximum likelihood (ML) method for continuous and semi-continuous variables.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
MGL.mle.mixed(
  obs,
  U,
  U_,
  f,
  copula = c("MGL", "MGL180", "MGL-EV", "MGL-EV180", "Gumbel", "Normal", "MGB2", "t"),
  umin,
  hessian = TRUE,
  initpar,
  ...
)

Arguments

obs

two-dimensional matrix for loss observations (y1, y2).

U

two-dimenstional matrix for pseudo copula data with values in [0,1] for (F(y1), F(y2)).

U_

two-dimensional matrix for pseudo copula data for the data (F(y1), F(y2-1)).

f

values of the density function for marginal distribution.

copula

copula 'MGL', 'MGL180', "MGL-EV", "MGL-EV180", "MGB2", "Normal" , "t".

umin

threshold value used in the semi-continuous data.

hessian

Logical. Should a numerically differentiated Hessian matrix be returned?

initpar

Initial values for the parameters to be optimized over.

...

additional arguments, see nlm for more details.

Details

The estimation method is performed via nlm function. Y1: continuous variable Y2: semi-continuous variable when Y2>umin, it is continuous and Y2<=umin is discrete.

For a portfolio of n observations (y_{i1},y_{i2}; \; i=1,…,n), the joint density function of (Y_1,Y_2) can be written as

f_{Y_{1},Y_2}(y_{i1},y_{i2})=\begin{cases} f_{Y_1}(y_{i1})[ h_{2|1}(F_{Y_{1}}(y_{i1}),F_{Y_{2}}(y_{i2})) - h_{2|1}(F_{Y_{1}}(y_{i1}),F_{Y_{2}}(y_{i2}-1)) ], & y_{i2}≤ umin,\\ f_{Y_1}(y_{i1})f_{Y_2}(y_{i2})c(F_{Y_{1}}(y_{i1}), F_{Y_{2}}(y_{i2})), & y_{i2} > umin, \end{cases}

where the density f_{Y_j}(\cdot) and cdf F_{Y_j}(\cdot) of the marginal distributions (i=1,2) are specified respectively. Here h_{2|1}(u_1, u_2)=\partial C(u_1,u_2)/\partial u_1 is the h-function of bivariate copula.

copula:

Value

A list containing the following components:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(rMGLReg)
# load the Chinese earthquake data set
u <- cbind(earthqCHI$u1, earthqCHI$u2) # cdf of marginal distribution
u_ <- cbind(earthqCHI$u1, earthqCHI$u2_) # cdf of marginal distribution for Y1 and Y2 - 1
y <- cbind(earthqCHI$y1, earthqCHI$y2)  # observations
f <- cbind(earthqCHI$f1, earthqCHI$f2) # pdf of marginal distribution
obs <- y
U <- u
U_ <- u_
umin <- 20
m.MGLMGA180 <- MGL.mle.mixed(obs = y, U = U, U_ = U_,
umin = umin, f = f,
copula = "MGL180",
method = "L-BFGS-B", initpar = c(2))
m.MGLMGA180

lizhengxiao/rMGLReg documentation built on Jan. 2, 2022, 8:52 a.m.