View source: R/binary_multiESS.R
binary_corr_matrix | R Documentation |
Correlation matrix for binary variables.
binary_corr_matrix(x, ncores = 2)
x |
a matrix or data.frame containing only binary variables. |
ncores |
(optional) number of cores to be used. |
a correlation matrix.
N <- 100
M <- 1000
X <- matrix(rbinom(n = N*M, size = 1, p = .234), ncol = N, nrow = M)
cormat.binary <- binary_corr_matrix(X)
cormat.default <- cor(X)
plot(cormat.binary ~ cormat.default)
abline(a = 0, b = 1, lty = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.