| Title: | Dependency Coefficients |
| Type: | Package |
| Version: | 1.0.1 |
| Date: | 2026-06-13 |
| Author: | Eckhard Liebscher [aut, cre] |
| Maintainer: | Eckhard Liebscher <eckhard.liebscher@hs-merseburg.de> |
| Description: | Functions to compute coefficients measuring the dependence of two or more than two variables. The functions can be deployed to gain information about functional dependencies of the variables with emphasis on monotone functions. The statistics describe how well one response variable can be approximated by a monotone function of other variables. In regression analysis the variable selection is an important issue. In this framework the functions could be useful tools in modeling the regression function. Detailed explanations on the subject can be found in papers Liebscher (2014) <doi:10.2478/demo-2014-0004>; Liebscher (2017) <doi:10.1515/demo-2017-0012>; Liebscher (2021): https://arfjournals.com/image/catalog/Journals%20Papers/AJSS/No%202%20(2021)/4-AJSS_123-150.pdf; Liebscher (2021): Kendall regression coefficient. Computational Statistics and Data Analysis 157. 107140. |
| Depends: | R (≥ 3.5.0) |
| Suggests: | MASS, faraway, testthat (≥ 3.0.0) |
| License: | GPL-2 |
| Encoding: | UTF-8 |
| LinkingTo: | Rcpp |
| Imports: | Rcpp, copula |
| RoxygenNote: | 7.3.2 |
| NeedsCompilation: | yes |
| Config/testthat/edition: | 3 |
| Packaged: | 2026-06-16 13:31:34 UTC; eclie |
| Repository: | CRAN |
| Date/Publication: | 2026-06-16 15:10:06 UTC |
coeffpml
Description
Computing whatever
Usage
coeffpml(u1, v1, u2, v2, amin, parp, parh, n, na, mf)
Arguments
u1 |
Ranks of x-values in subregion |
v1 |
Ranks of x-values in subregion |
u2 |
ranks of y-values in subregion |
v2 |
ranks of y-values in subregion |
amin |
minimum fraction of sample items in a subregion |
n |
total number of sample items |
na |
number of data in subregion |
mf |
int |
Details
Some details
Value
NumericVector
Author(s)
Eckhard Liebscher
Kendall regression coefficient
Description
The function kendr evaluates the Kendall regression coefficient. It describes how well the target variable y can be fitted by a function of the regressor variables which increases or decreases as the regressors increase.
Usage
kendr(x,y,direction=NULL,out=0,outsd=TRUE,eps=0.95)
Arguments
x |
data matrix of regressor variables |
y |
data vector of the response variable |
direction |
vector of length d (d is number of regressors), value 1 refers to regressors leading to increasing y whenever this regressor increases, value -1 refers to regressors leading to decreasing y whenever this regressor increases. If direction=NULL, then all coefficients are computed. |
out |
value 1: full output, value 0: reduced output of one coefficient that is largest in absolute value |
outsd |
logical. If TRUE, the estimated standard deviation and confidence intervals are evaluated. If FALSE, the evaluation is suppressed |
eps |
real value, confidence level. |
Value
A list of the coefficients for several directions with components:
- dcoeff
Kendall regression coefficient
- dir
direction vector
- Pxx
fraction of
X \le \breve{X}where\breve{X}has the same distribution asX- sd
standard error
- conf
confidence interval
References
Eckhard Liebscher (2021). Kendall regression coefficient. Computational Statistics and Data Analysis 157 (2021). 107140
Examples
library(MASS)
data <- gilgais
kendr(data[,1:3],data[,4],out=1)
Multivariate Kendall regression coefficient
Description
The function kendrm evaluates the multivariate Kendall regression coefficient. It describes how well the response vector y can be fitted by a function of the regressor variables which increases or decreases as the regressors increases.
Usage
kendrm(x,y,direction=NULL,out=0,outsd=TRUE,eps=0.95)
Arguments
x |
data matrix of regressor variables |
y |
data matrix of the response vector |
direction |
vector of length d (d is number of regressors), value 1 refers to regressors leading to increasing y whenever this regressor increases, value -1 refers to regressors leading to decreasing y whenever this regressor increases. If direction=NULL, then all coefficients are computed. |
out |
value 1: full output, value 0: reduced output of one coefficient that is largest in absolute value, value 2: only the largest coefficient |
outsd |
logical. If TRUE, the estimated standard deviation and confidence intervals are evaluated. If FALSE, the evaluation is suppressed |
eps |
real value, confidence level. |
Value
A list of the coefficients for several directions with components:
- dcoeff
Kendall regression coefficient
- dir
direction vector
- Pxx
fraction of
X \le \breve{X}where\breve{X}has the same distribution asX- sd
standard deviation
- conf
confidence interval
References
Eckhard Liebscher (2026). Kendall regression coefficient revisited.
Examples
library(faraway)
y<- fat[,c("brozek","siri")]
x<- fat[,c("weight","adipos","abdom","hip")]
kendrm(x,y,direction=NULL,out=1,outsd=FALSE)
kendrm(x,y,direction=NULL,out=0,outsd=TRUE)
Kendall regression coefficient for split domains
Description
The function kendrs evaluates the multivariate Kendall regression coefficient for two regressors and split regressor region. It describes how well the response variable can be fitted in each split region by a function which increases or decreases as the regressors increase.
Usage
kendrs(x,y,splitp=NULL)
Arguments
x |
data matrix of regressor variables with two columns, |
y |
data vector of the response variable |
splitp |
vector of length 2 of the splitting points, If p1 is the first component of this vector, then the point splits the domain of the first regressor into a left region of fraction p1 of data items and a right region of the remaining data items. The same is done for the second regressor. As the result we obtain 4 subregions of the regressor domain. default=c(0.5,0.5) |
Value
A list of Kendall regression coefficients for the 4 split regions (11=left lower region, 12=left upper region...) with components
- dcoeff++
split coefficient ++
- dcoeff+-
split coefficient +-
- totalcoeff
total coefficient
- directions
optimal directions
direction ++ means that y increases whenever both regressors increases direction +- means that y increases whenever the first regressor increases and the other regressor decreases..etc.
References
Eckhard Liebscher (2021). Kendall regression coefficient. Computational Statistics and Data Analysis 157 (2021). 107140
Examples
library(MASS)
data<- gilgais
kendrs(data[,1:2],data[,3],splitp=c(0.4,0.6))
Multivariate Kendall's tau
Description
The function kendtaum evaluates the multivariate Kendall's tau coefficient. It describes the dependence of the variables in the data matrix
Usage
kendtaum(x,outsd=TRUE,eps=0.95)
Arguments
x |
data matrix of regressor variables |
outsd |
logical. If TRUE, the estimated standard deviation and confidence intervals are evaluated. If FALSE, the evaluation is suppressed |
eps |
real value, confidence level. |
Value
A list of the coefficients for several directions with components:
- dcoeff
multivariate Kendall's tau
- sd
standard error
- conf
confidence interval
References
Schmid, F.; Schmidt, R.; Blumentritt, T.; Gaißer, S.; Ruppert, M. (2010). Copula-based measures of multivariate association. in F. Durante, W. Härdle, P. Jaworski, T. Rychlik (eds.) Copula Theory and Its Applications. Springer Berlin, 2010.
Examples
library(MASS)
data <- gilgais
kendtaum(data[,1:4],outsd=TRUE)
Spearman regression coefficient
Description
The function spearr evaluates the multivariate Spearman regression coefficient. It describes how well the target variable y can be fit by a function of regressor variables which is increasing w.r.t. some regressors and decreasing w.r.t. the other regressors.
Usage
spearr(x,y,direction=NULL,out=0)
Arguments
x |
data matrix of regressor variables |
y |
data vector of the target variable |
direction |
vector of length d (d is number of regressors), value 1 refers to regressors leading to increasing y whenever this regressor increases, value -1 refers to regressors leading to decreasing y whenever this regressor increases. If direction=NULL, then all coefficients are computed. |
out |
value 1: full output, value 0: reduced output, only coefficient that is largest in absolute value |
Value
A list containing
- dcoeff
Spearman regression coefficient
- dir
direction vector
References
Eckhard Liebscher (2021). On a multivariate version of Spearman's correlation coefficient for regression: Properties and Applications. Asian Journal of Statistical Sciences 1, No. 2, 123-150.
Examples
library(MASS)
data <- gilgais
spearr(data[,1:3],data[,4],out=1)
Spearman regression coefficient for split domains
Description
The function spearrs evaluates the multivariate Spearman regression coefficient for two regressors and split regressor region. It describes how well the response variable can be fitted in each split region by a function which increases or decreases as the regressors increase.
Usage
spearrs(x,y,splitp=NULL)
Arguments
x |
data matrix of regressor variables with two columns, |
y |
data vector of the target variable |
splitp |
vector of length 2 of the splitting points, If p1 is the first component of this vector, then the point splits the domain of the first regressor into a left region of fraction p1 of data items and a right region of the remaining data items. The same is done for the second regressor. As the result we obtain 4 subregions of the regressor domain. default=c(0.5,0.5) |
Value
A list of Spearman regression coefficients for the 4 split regions (11=left lower region, 12=left upper region...) with components:
- dcoeff++
split coefficient ++
- dcoeff+-
split coefficient +-
- totalcoeff
total coefficient
- directions
optimal directions for the several split regions
direction ++ means that y increases whenever both regressors increases direction +- means that y increases whenever the first regressor increases and the other regressor decreases..etc.
References
Eckhard Liebscher (2021). On a multivariate version of Spearman's correlation coefficient for regression: Properties and Applications. Asian Journal of Statistical Sciences 1, No. 2, 123-150.
Examples
library(MASS)
data<- gilgais
spearrs(data[,1:2],data[,3],splitp=c(0.4,0.6))
Xi dependence coefficient
Description
xic is a function to evaluate the xi dependence coefficient (one interval) of two random variables x and y which is based on the copula. Two specific coefficients are available: the power coefficient and the Huber function coefficient.
Usage
xic(x,y,method="power",methodF=1,parH=0.5,parp=1.5,outsd=TRUE,eps=0.95)
Arguments
x, y |
data vectors of the two variables whose dependence is analysed. |
method |
list of names of the coefficients: "power" stands for the power function coefficient, "Huber" means the Huber function coefficient. If "all" is assigned to method then all methods are used. |
methodF |
value 1,2 or 3 refers to several methods for computation of the distribution function values, 1 is the default value. |
parH |
parameter of the Huber function (default 0.5). Valid values for parH are between 0 and 1. |
parp |
parameter of the power function (default 1.5). The parameter has to be positive. |
outsd |
logical. If TRUE, the estimated standard deviation and confidence intervals are evaluated. If FALSE, the evaluation is suppressed |
eps |
real value, confidence level. |
Details
Let X_{1},\ldots ,X_{n} be the sample of the X variable. Formulas
for the estimators of values F(X_{i}) of the distribution function:
methodF = 1 \rightarrow \hat{F}(X_{i})=\frac{1}{n}\textrm{rank}(X_{i})
methodF = 2 \rightarrow \hat{F}^{1}(X_{i})=\frac{1}{n+1}\textrm{rank}(X_{i})
methodF = 3 \rightarrow \hat{F}^{2}(X_{i})=\frac{1}{\sqrt{n^{2}-1}}\textrm{rank}(X_{i})
The values of the distribution function of Y are treated analogously.
Value
A list of the following vectors:
- power
zeta coefficient with power function, standard error, confidence interval
- Huber
zeta coefficient with Huber function, standard error, confidence interval
The zeta dependence coefficient of two random variables is bounded by 1. The higher the value the stronger is the dependence.
References
Eckhard Liebscher (2014). Copula-based dependence measures. Dependence Modeling 2 (2014), 49-64
Examples
library(MASS)
data<- gilgais
xic(data[,1],data[,2])
Zeta dependence coefficient
Description
zetac is a function to evaluate the zeta dependence coefficient (one interval) of two random variables x and y which is based on the copula. Four specific coefficients are available: the Spearman coefficient, Spearman's footrule, the power coefficient and the Huber function coefficient.
Usage
zetac(x,y,method="Spearman",methodF=1,parH=0.5,parp=1.5,outsd=TRUE,eps=0.95)
Arguments
x, y |
data vectors of the two variables whose dependence is analysed. |
method |
list of names of the coefficients: "Spearman" stands for the Spearman coefficient, "footrule" means Spearman's footrule, "power" stands for the power function coefficient, "Huber" means the Huber function coefficient. If "all" is assigned to method then all methods are used. |
methodF |
value 1,2 or 3 refers to several methods for computation of the distribution function values, 1 is the default value. |
parH |
parameter of the Huber function (default 0.5). Valid values for parH are between 0 and 1. |
parp |
parameter of the power function (default 1.5). The parameter has to be positive. |
outsd |
logical. If TRUE, the estimated standard deviation and confidence intervals are evaluated. If FALSE, the evaluation is suppressed |
eps |
real value, confidence level. |
Details
Let X_{1},\ldots ,X_{n} be the sample of the X variable. Formulas
for the estimators of values F(X_{i}) of the distribution function:
methodF = 1 \rightarrow \hat{F}(X_{i})=\frac{1}{n}\textrm{rank}(X_{i})
methodF = 2 \rightarrow \hat{F}^{1}(X_{i})=\frac{1}{n+1}\textrm{rank}(X_{i})
methodF = 3 \rightarrow \hat{F}^{2}(X_{i})=\frac{1}{\sqrt{n^{2}-1}}\textrm{rank}(X_{i})
The values of the distribution function of Y are treated analogously.
Value
A list of the following vectors:
- Spearman
zeta Spearman coefficient, standard error, confidence interval
- footrule
zeta footrule coefficient, standard error, confidence interval
- power
zeta coefficient with power function, standard error, confidence interval
- Huber
zeta coefficient with Huber function, standard error, confidence interval
The zeta dependence coefficient of two random variables is bounded by 1. The higher the value the stronger is the dependence.
References
Eckhard Liebscher (2014). Copula-based dependence measures. Dependence Modeling 2 (2014), 49-64
Examples
library(MASS)
data<- gilgais
zetac(data[,1],data[,2],method="all")
Zeta coefficient of piecewise monotonicity with split domain
Description
The function zetaci evaluates the coefficient of piecewise monotonicity of variables x and y where the x-domain is split into a fixed number of intervals.
Usage
zetaci(x,y,a,method="Spearman",methodF=1,parH=0.5,parp=1.5)
Arguments
x, y |
data vectors of the two variables whose dependence is analysed. |
a |
vector of fractions |
method |
value (default "Spearman") |
methodF |
value 1,2 or 3 refers to several methods for computation of the distribution function values, 1 is the default value. |
parH |
parameter of the Huber function (default 0.5). Valid values for parH are between 0 and 1. |
parp |
parameter of the power function (default 1.5). The parameter has to be positive. |
Details
Let X_{1},\ldots ,X_{n} be the sample of the X variable. Formulas
for the estimators of values F(X_{i}) of the distribution function:
methodF = 1 \rightarrow \hat{F}(X_{i})=\frac{1}{n}\textrm{rank}(X_{i})
methodF = 2 \rightarrow \hat{F}^{1}(X_{i})=\frac{1}{n+1}\textrm{rank}(X_{i})
methodF = 3 \rightarrow \hat{F}^{2}(X_{i})=\frac{1}{\sqrt{n^{2}-1}}\textrm{rank}(X_{i})
The values of the distribution function of Y are treated analogously.
Value
A list of zeta dependence coefficients of piecewise monotonicity of two random variables containing the following elements:
- Spearman
zeta Spearman plusminus/minusplus coefficient
- footrule
zeta Spearman's footrule plusminus/minusplus coefficient
- power
zeta power plusminus/minusplus coefficient
- Huber
zeta Huber plusminus/minusplus coefficient
References
Eckhard Liebscher (2017). Copula-based dependence measures for piecewise monotonicity. Dependence Modeling 5 (2017), 198-220
Examples
library(MASS)
x<- seq(0,1.0,by=0.01)
eps<- rnorm(length(x),sd=0.05)
y<- x-2*(x>=0.4)*(x-0.4)+4*(x>=0.75)*(x-0.75)+eps
zetaci(x,y, a=c(0.25, 0.5, 0.75))
Zeta dependence coefficient of piecewise monotonicity
Description
zetapm is a function to evaluate the zeta dependence coefficients of piecewise monotonicity of two random variables x and y which is based on the copula. The regressor domain (domain of x) is split into two parts. The function searches for the optimal splitting point to obtain maximum depedence. The main part of the function is coded as C++ procedure
Usage
zetapm(x,y,amin=0.25,method="all",methodF=1,parp=1.5,parH=0.5)
Arguments
x, y |
data vectors of the two variables whose dependence is analysed. |
amin |
minimum fraction of sample items to be used for one split region |
method |
vector of chosen special coefficients: Spearman...Spearman coefficient footrule...Spearman's footrule power...power coefficient Huber...Huber function coefficient, "all" refers to all coefficients |
methodF |
value 1,2 or 3 refers to several methods for computation of the distribution function values, 1 is the default value. |
parp |
parameter of the power function (default 1.5). The parameter has to be positive. |
parH |
parameter of the Huber function (default 0.5). Valid values for parH are between 0 and 1. |
Details
Let X_{1},\ldots ,X_{n} be the sample of the X variable. Formulas
for the estimators of values F(X_{i}) of the distribution function:
methodF = 1 \rightarrow \hat{F}(X_{i})=\frac{1}{n}\textrm{rank}(X_{i})
methodF = 2 \rightarrow \hat{F}^{1}(X_{i})=\frac{1}{n+1}\textrm{rank}(X_{i})
methodF = 3 \rightarrow \hat{F}^{2}(X_{i})=\frac{1}{\sqrt{n^{2}-1}}\textrm{rank}(X_{i})
The values of the distribution function of Y are treated analogously.
Value
A list of zeta dependence coefficients of piecewise monotonicity of two random variables containing the following elements:
- plusminuscoeff
zeta plusminus coefficients: Spearman, footrule, power, Huber coefficients if chosen
- position1
positions of the optimal split points within the x-value (zeta plusminus coefficients)
- minuspluscoeff
zeta minuspluscoeff coefficients: Spearman, footrule, power, Huber coefficients if chosen
- position2
positions of the optimal split points within the x-value (zeta minusplus coefficients)
References
Eckhard Liebscher (2017). Copula-based dependence measures for piecewise monotonicity. Dependence Modeling 5 (2017), 198-220
Examples
x<- seq(0,1.0,by=0.01)
eps<- rnorm(length(x),sd=0.05)
y<- x-2*(x>=0.4)*(x-0.4)+eps
zetapm(x,y,amin=0.2,method="all",methodF=1,parp=1.5,parH=0.5)