Package 'censorcopula'

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

Help Index


Censor method to break ties

Description

Implement an interval censor method to break ties when using data with ties to fitting a bivariate copula.

Details

nothing

Author(s)

Yan Li, Yang Li, Yichen Qin, and Jun Yan

References

Yan Li, Yang Li, Yichen Qin, and Jun Yan. Statistical Inference for Copula Modeling(working paper)

Examples

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)

Using censor method to break ties

Description

Estimate the parameter of copula with interval censor method to break ties in data.

Usage

intervalFitb(copula, method, x, start, lower, upper, optim.control, 
             estimate.variance, hideWarnings, bound.eps)

Arguments

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

Details

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.

Value

fit

Estimation of parameter

Note

The intervalFitb function only works for bivariate copula function.

Author(s)

Yan Li

References

None

Examples

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

Description

likelihood function used in intervalFitb()

Usage

Newloglik2(param, x, copula)

Arguments

param

Value of parameter in copula function

x

Inputted dataset

copula

Selected copula function

Details

none

Value

result

The result of log-likelihood function

Note

It's a internal log-likelihood function used in optim function

Author(s)

Yan Li

References

none

See Also

none

Examples

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))