Description Usage Arguments Details Value Examples
MGL.reg
is used to fit bivariate MGL and MGL-EV copula regression models for two continuous variables.
1 2 3 4 5 6 7 8 |
U |
two-dimensional matrix with values in [0,1]. |
X |
design matrix |
copula |
'MGL', 'MGL180', "MGL-EV", "MGL-EV180", "Gumbel", "MGB2". |
hessian |
Logical. Should a numerically differentiated Hessian matrix be returned? |
initpar |
Initial values for the parameters to be optimized over. |
... |
additional arguments, see |
The estimation method is performed via optim
function. Y1 and Y2 are both continuous variables.
copula: "MGL180" and "MGLEV180" denote the survival MGL and survival MGL-EV copula respectively.
For "Gumbel" regression model, the copula parameter
δ_i = \exp(X_i^Tβ) + 1,
where {X}_{i}=(1,x_{i1}...,x_{ik}) denotes the vector of covariates and β is the vector of coefficients to be estimated in the copula regression.
For "MGL", "MGL180", "MGL-EV", "MGL-EV180" regression model, the copula parameter
δ_i = \exp(X_i^Tβ).
For "MGB2", the copula parameter
\q_i = \exp(X_i^Tβ)
and (p_1,p_2) remain to be constant.
Note that the regression modelling can be extended to the high-dimensional case when copula is "MGL180" and "MGL".
A list containing the following components:
loglike: the value of the estimated maximum of the loglikelihood function.
copula: the name of the fitted copula. "MGL180" and "MGL-EV180" denote the survival MGL and MGL-EV copula respectively.
estimates: the point at which the maximum value of the loglikelihood is obtained.
se: the standard errors of the estimators.
AIC, BIC: the goodness fit of the regression models.
hessian: the hessian at the estimated maximum of the loglikelihood (if requested).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 10-dimensional regression models
set.seed(111)
d <- 10
n <- 1000 # sample size
beta.true <- c(-0.6, 0.5, 0.2) # true regression coefficients
x1 <- rnorm(n, 0, 1)
x2 <- rnorm(n, 0, 1)
X <- model.matrix(~ x1 + x2) # design matrix
delta.sim <- as.vector(exp(X%*%beta.true)) # true copula parameters
Usim <- matrix(0, nrow = n, ncol = d)
for (i in 1:n){
Usim[i, ] <- rcMGL.multi(n = 1, d = d, pars = delta.sim[i])
}
m.MGLMGA <- MGL.reg(U = Usim, copula = "MGL",
X = X, method = "Nelder-Mead",
initpar = c(-0.32, 0.001, 0.001)
)
m.MGLMGA
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.