R.bounds | R Documentation |
Replaces impossible correlations (values too small or too large) with minimum and maximum correlations, respectively.
min_r(p1, p2)
max_r(p1, p2)
R.bounds(p, R, pad = 0.001)
p1 |
Probability of success for first random variable |
p2 |
Probability of success for second random variable |
p |
Vector of marginal probabilities for multivariate Bernoulli random variables, for |
R |
Raw correlation matrix for random variables |
pad |
Padding (in correlation units) to adjust the returned correlation matrix with respect extremal values. |
The functions r.min
and r.max
define minimum and maximimum possible correlations. The function R.bounds
replaces impossibly large or small values with maximally large or small values repectively.
Functions return a scalar defining minimum or maximimum possible correlations. See Aho et al. (2023).
Ken Aho
Aho, K., Derryberry, D., Godsey, S. E., Ramos, R., Warix, S., Zipper, S. (2023) The communication distance of non-perennial streams. EarthArXiv https://eartharxiv.org/repository/view/4907/
min_r(0.6, 0.9)
max_r(0.1, 0.2)
x1 <- rep(c(1,0),5)
x2 <- c(rep(1,7), rep(0,3))
x3 <- c(rep(1,3), rep(0,7))
R <- cor(cbind(x1, x2, x3))
R.bounds(c(0.5, 0.7, 1), R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.