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 |
This function computes the empirical bivariate copula at a series of points.
copulaEmp(u, U)
copulaEmp(u, U)
u |
(nx2) data matrix of points. |
U |
(nx2) data matrix of pseudo-observations. |
cdf |
Empirical copula values at u. |
Bouchra R. Nasri, August 14, 2019
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);
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);
This function estimates the copula parameter and the non-centrality parameters of a non-central squared copula
EstNCSCop(y, family, p = 2, InitialValues = NULL)
EstNCSCop(y, family, p = 2, InitialValues = NULL)
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 |
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 |
Bouchra R. Nasri, August 14, 2019
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.
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param) estimation <- EstNCSCop(U,'Clayton')
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param) estimation <- EstNCSCop(U,'Clayton')
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.
initialValues(U, family = "Clayton")
initialValues(U, family = "Clayton")
U |
(nx2) data matrix of pseudo-observations. |
family |
'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel'. |
paraml |
Initial values for the non-centrality parameters and Kendall's tau to be included in the EstNCSCop function. |
Bouchra R. Nasri, August 14, 2019
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param) param = initialValues(U, 'Clayton');
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param) param = initialValues(U, 'Clayton');
This function computes the Kendall's tau of a copula family for a given a unconstrainted parameter alpha.
KendallTau(family, alpha)
KendallTau(family, alpha)
family |
"Gaussian" , "t" , "Clayton" , "Frank" , "Gumbel" |
alpha |
unconstrainted parameters of the copula family |
tau |
estimated Kendall's tau |
theta |
estimated copula parameter (constrained) |
Bouchra R. Nasri, August 14, 2019
KendallTau('Clayton',0)
KendallTau('Clayton',0)
This function computes the log-likelihood vector of a non-central squared copula
LoglikNCSCop(alpha, U, family, p = 2)
LoglikNCSCop(alpha, U, family, p = 2)
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). |
LL |
Vector of log-likelihoods |
Bouchra R. Nasri, August 14, 2019
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')
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')
This function computes the distribution function a non-central squared copula
NCSCopCdf(u, family, param, dof = NULL)
NCSCopCdf(u, family, param, dof = NULL)
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). |
cdf |
Non-central squared copula evaluated at points u. |
Bouchra R. Nasri, August 14, 2019
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);
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);
This function computes the parameter of the copula according to CRAN copula package where corresponding to the unconstrainted parameters alpha.
ParamCop(family, alpha)
ParamCop(family, alpha)
family |
"Gaussian" , "t" , "Clayton" , "Frank" , "Gumbel" |
alpha |
unconstrainted parameters of the copula family |
theta |
Bivariate vector of constrained copula family parameters |
Bouchra R. Nasri, August 14, 2019
ParamCop('Clayton',0)
ParamCop('Clayton',0)
This function computes the unconstrainted parameter alpha for a given Kendall's tau
ParamTau(family, tau)
ParamTau(family, tau)
family |
'Gaussian' , 't' , 'Clayton' , 'Frank' , 'Gumbel' |
tau |
Kendall's tau of the copula family |
alpha |
Unconstrainted parameter |
Bouchra R. Nasri, August 14, 2019
ParamTau('Clayton',0.5)
ParamTau('Clayton',0.5)
This function simulates observations a bivariate non-central squared copula model.
SimNCSCop(family, n, param, DoF = NULL)
SimNCSCop(family, n, param, DoF = NULL)
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). |
U |
Simulated Data |
Bouchra R. Nasri, August 14, 2019
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param)
param <- c(0.8, 2.5, 0.7) ; U <- SimNCSCop('Clayton', 250, param)