Package 'NCSCopula'

Title: Non-Central Squared Copula Models Estimation
Description: Inference and dependence measure for the non-central squared Gaussian, Student, Clayton, Gumbel, and Frank copula models.The description of the methodology is taken from Section 3 of Nasri, Remillard and Bouezmarni (2019) <doi:10.1016/j.jmva.2019.03.007>.
Authors: Bouchra R. Nasri
Maintainer: Bouchra R. Nasri <[email protected]>
License: GPL (>= 2)
Version: 1.0.1
Built: 2024-11-10 04:44:44 UTC
Source: https://github.com/cran/NCSCopula

Help Index


Empirical copula

Description

This function computes the empirical bivariate copula at a series of points.

Usage

copulaEmp(u, U)

Arguments

u

(nx2) data matrix of points.

U

(nx2) data matrix of pseudo-observations.

Value

cdf

Empirical copula values at u.

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

param <- c(0.8, 2.5, 0.7) ;
U <- SimNCSCop('Clayton', 250, param)
u = matrix(c(0.2,0.6,0.3,0.5,0.7,0.9),ncol=2,byrow=TRUE);
cdf=copulaEmp(u,U);

Estimation of a non-central squared copula model

Description

This function estimates the copula parameter and the non-centrality parameters of a non-central squared copula

Usage

EstNCSCop(y, family, p = 2, InitialValues = NULL)

Arguments

y

(nx2) data matrix (observations or residuals) that will be transformed to pseudo-observations

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'

p

number of non-centrality parameters to be estimated (p = 0,1,2)

InitialValues

initial values c(a1,a2,tau) to start the estimation; otherwise pre-selected values will be used

Value

theta

Estimated parameter of the copula according to CRAN copula package

dof

Estimated degrees of freedom, only for the Student copula

tau

Estimated theoretical Kendall tau for the copula family

Author(s)

Bouchra R. Nasri, August 14, 2019

References

Section 5.1 of Nasri, RĂ©millard & Bouezmarni (2019). Semi-parametric copula-based models under non-stationarity, Journal of Multivariate Analysis, 173, pages 347-365.

Examples

param <- c(0.8, 2.5, 0.7) ;
U <- SimNCSCop('Clayton', 250, param)
estimation <- EstNCSCop(U,'Clayton')

Initial values for estimation

Description

This function computes initial values of non-centrality parameters and Kendall's tau at selected points for the estimation non-central squared copula parameters. The results are not satisfactory. Do not use.

Usage

initialValues(U, family = "Clayton")

Arguments

U

(nx2) data matrix of pseudo-observations.

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'.

Value

paraml

Initial values for the non-centrality parameters and Kendall's tau to be included in the EstNCSCop function.

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

param <- c(0.8, 2.5, 0.7) ;
U <- SimNCSCop('Clayton', 250, param)
param = initialValues(U, 'Clayton');

Kendall's tau of a copula

Description

This function computes the Kendall's tau of a copula family for a given a unconstrainted parameter alpha.

Usage

KendallTau(family, alpha)

Arguments

family

"Gaussian" , "t" , "Clayton" , "Frank" , "Gumbel"

alpha

unconstrainted parameters of the copula family

Value

tau

estimated Kendall's tau

theta

estimated copula parameter (constrained)

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

KendallTau('Clayton',0)

Log-likelihood of a non-central squared copula

Description

This function computes the log-likelihood vector of a non-central squared copula

Usage

LoglikNCSCop(alpha, U, family, p = 2)

Arguments

alpha

unconstrained non-centrality parameters a1, a2, and unconstrained copula parameters.

U

(nx2) data matrix of pseudo-observations.

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'.

p

number of different non-centrality parameters (0,1,2 default).

Value

LL

Vector of log-likelihoods

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

alpha = c(log(0.2),log(5),log(2),log(12));
param = c(0.5,2.5,0.5);
data = SimNCSCop('Clayton', 250, param);
LL = LoglikNCSCop(alpha,data,'Clayton')

Distribution function of a non-central squared copula

Description

This function computes the distribution function a non-central squared copula

Usage

NCSCopCdf(u, family, param, dof = NULL)

Arguments

u

(nx2) data matrix of pseudo-observations.

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'.

param

c(a1,a2,tau) where a1,a2 are the non-negative non-centrality

dof

degrees of freedom of the Student copula (if needed).

Value

cdf

Non-central squared copula evaluated at points u.

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

param = c(0.8,2.5,0.7);
u = matrix(c(0.2,0.6,0.3,0.5,0.7,0.9),ncol=2,byrow=TRUE);
cdf=NCSCopCdf(u,'Clayton',param);

Gives the parameters of the copula family

Description

This function computes the parameter of the copula according to CRAN copula package where corresponding to the unconstrainted parameters alpha.

Usage

ParamCop(family, alpha)

Arguments

family

"Gaussian" , "t" , "Clayton" , "Frank" , "Gumbel"

alpha

unconstrainted parameters of the copula family

Value

theta

Bivariate vector of constrained copula family parameters

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

ParamCop('Clayton',0)

Unconstrained parameters

Description

This function computes the unconstrainted parameter alpha for a given Kendall's tau

Usage

ParamTau(family, tau)

Arguments

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'

tau

Kendall's tau of the copula family

Value

alpha

Unconstrainted parameter

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

ParamTau('Clayton',0.5)

Simulation of a bivariate non-central squared copula

Description

This function simulates observations a bivariate non-central squared copula model.

Usage

SimNCSCop(family, n, param, DoF = NULL)

Arguments

family

'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'.

n

number of simulated vectors.

param

c(a1,a2,tau) where a1,a2 are the non-negative non-centrality

DoF

degrees of freedom of the Student copula (if needed).

Value

U

Simulated Data

Author(s)

Bouchra R. Nasri, August 14, 2019

Examples

param <- c(0.8, 2.5, 0.7) ;
U <- SimNCSCop('Clayton', 250, param)