lcor.ci | R Documentation |
Computes confidence intervals for the Lancaster correlation coefficient. Lancaster correlation is a bivariate measures of dependence.
lcor.ci(
x,
y = NULL,
conf.level = 0.95,
type = c("rank", "linear"),
con = TRUE,
R = 1000,
method = c("plugin", "boot", "pretest")
)
x |
a numeric vector, or a matrix or data frame with two columns. |
y |
NULL (default) or a vector with same length as x. |
conf.level |
confidence level of the interval. |
type |
a character string indicating which lancaster correlation is to be computed. One of "rank" (default), or "linear": can be abbreviated. |
con |
logical; if TRUE (default), conservative asymptotic confidence intervals are computed. |
R |
number of bootstrap replications. |
method |
a character string indicating how the asymptotic covariance matrix is computed if type ="linear". One of "plugin" (default), "boot" or "symmetric": can be abbreviated. |
Computes asymptotic and bootstrap-based confidence intervals for the (linear) Lancaster correlation coefficient \rho_L
(\rho_{L,1}
). For more details see lcor
.
Asymptotic confidence intervals are derived under two cases (analogously for \rho_{L}
; see Holzmann and Klar (2024)):
Case 1: If |\rho_{L1}|\neq|\rho_{L2}|
, the 1-\alpha
asymptotic interval is
\left[ \max\{\hat\rho_{L,1} - z_{1-\alpha/2}\,s/\sqrt{n}, 0\},\ \min\{\hat\rho_{L,1} + z_{1-\alpha/2}\,s/\sqrt{n}, 1\} \right],
where z_{1-\alpha/2}
is the standard normal quantile and s
is an estimator of the corresponding standard deviation.
Case 2: If |\rho_{L1}|=|\rho_{L2}|=a>0
, let \tau
denote the correlation between the two components and let q_{1-\alpha/2}
be the 1-\alpha/2
quantile of the asymptotic distribution of \sqrt{n}(\hat\rho_{L,1} - a)
. A conservative asymptotic interval is
\left[ \max\{\hat\rho_{L,1} - q_{1-\alpha/2}/\sqrt{n}, 0\},\ \min\{\hat\rho_{L,1} + z_{1-\alpha/2}\,s/\sqrt{n}, 1\} \right].
Additionally, bootstrap-based intervals can be obtained by resampling and estimating the covariance matrix of the rank or linear correlation components.
a vector containing the lower and upper limits of the confidence interval.
Hajo Holzmann, Bernhard Klar
Holzmann, Klar (2024). "Lancester correlation - a new dependence measure linked to maximum correlation". \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1111/sjos.12733")}
lcor, lcor.comp, lcor.test
n <- 1000
x <- matrix(rnorm(n*2), n)
nu <- 2
y <- x / sqrt(rchisq(n, nu)/nu) # multivariate t
lcor(y, type = "rank")
lcor.ci(y, type = "rank")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.