Title: | Estimate Parameter of Bivariate Copula |
---|---|
Description: | Implement an interval censor method to break ties when using data with ties to fitting a bivariate copula. |
Authors: | Yan Li, Yang Li, Yichen Qin, and Jun yan |
Maintainer: | Yan Li <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0 |
Built: | 2024-12-09 06:42:48 UTC |
Source: | CRAN |
Implement an interval censor method to break ties when using data with ties to fitting a bivariate copula.
nothing
Yan Li, Yang Li, Yichen Qin, and Jun Yan
Yan Li, Yang Li, Yichen Qin, and Jun Yan. Statistical Inference for Copula Modeling(working paper)
library(copula) ## Generate sample and introduce ties data <- rCopula(50, claytonCopula(2)) data[, 1] <- round(data[, 1], digit=1) ## Estimate parameter of clayton copula from the sample intervalFitb(copula=claytonCopula(2), method="BFGS", data)
library(copula) ## Generate sample and introduce ties data <- rCopula(50, claytonCopula(2)) data[, 1] <- round(data[, 1], digit=1) ## Estimate parameter of clayton copula from the sample intervalFitb(copula=claytonCopula(2), method="BFGS", data)
Estimate the parameter of copula with interval censor method to break ties in data.
intervalFitb(copula, method, x, start, lower, upper, optim.control, estimate.variance, hideWarnings, bound.eps)
intervalFitb(copula, method, x, start, lower, upper, optim.control, estimate.variance, hideWarnings, bound.eps)
copula |
Type of copula to fit the data |
method |
Method used in the 'optim' function |
x |
Data with ties |
See Details for following inputs:
start |
Initial value used in 'optim' function |
lower , upper
|
Bounds on the variables for the "L-BFGS-B" method or method "Brent" |
optim.control |
A list of control parameters |
estimate.variance |
Estimate variance |
hideWarnings |
Hide warnings in procedure of estimation |
bound.eps |
Minimum finite distance |
Except the 'copula', 'x' and 'method', other inputs of the intervalFitb function has default value.
For method,
Method "BFGS" is a quasi-Newton method (also known as a variable metric algorithm), specifically that published simultaneously in 1970 by Broyden, Fletcher, Goldfarb and Shanno. This uses function values and gradients to build up a picture of the surface to be optimized.
Method "L-BFGS-B" is that of Byrd et. al. (1995) which allows box constraints, that is each variable can be given a lower and/or upper bound. The initial value must satisfy the constraints. This uses a limited-memory modification of the BFGS quasi-Newton method. If non-trivial bounds are supplied, this method will be selected, with a warning.
Method "Brent" is for one-dimensional problems only, using 'optimize' function. It can be useful in cases where optim() is used inside other functions where only method can be specified, such as in mle from package stats4.
fit |
Estimation of parameter |
The intervalFitb function only works for bivariate copula function.
Yan Li
None
library(copula) ## Generate sample and introduce ties data <- rCopula(50, claytonCopula(2)) data[, 1] <- round(data[, 1], digit=1) ## Estimate parameter of clayton copula from the sample intervalFitb(copula=claytonCopula(2), method="BFGS", data)
library(copula) ## Generate sample and introduce ties data <- rCopula(50, claytonCopula(2)) data[, 1] <- round(data[, 1], digit=1) ## Estimate parameter of clayton copula from the sample intervalFitb(copula=claytonCopula(2), method="BFGS", data)
likelihood function used in intervalFitb()
Newloglik2(param, x, copula)
Newloglik2(param, x, copula)
param |
Value of parameter in copula function |
x |
Inputted dataset |
copula |
Selected copula function |
none
result |
The result of log-likelihood function |
It's a internal log-likelihood function used in optim function
Yan Li
none
none
library(copula) ## generate sample data <- rCopula(50, claytonCopula(2)) ## return the value of log-likelihood funcion for selected params Newloglik2(param=2, data, claytonCopula(2))
library(copula) ## generate sample data <- rCopula(50, claytonCopula(2)) ## return the value of log-likelihood funcion for selected params Newloglik2(param=2, data, claytonCopula(2))