Description Usage Arguments Value Author(s) Examples
Simulates a set of point correlated to another set according to the
procrustean correlation definition.
Points are simulated by drawing values of each dimension from a normal
distribution of mean 0 and standard deviation equals to 1.
The mean of each dimension is forced to 0 (data are centred).
By default variable are also scaled to enforce a strandard deviation
strictly equal to 1. Covariances between dimensions are not controled.
Therefore they are expected to be equal to 0 and reflect only the
random distribution of the covariance between two random vectors.
The intensity of the correlation is determined by the r2
parameter.
1 | simulate_correlation(reference, p, r2, equal_var = TRUE)
|
reference |
a numeric matrix to which the simulated data will be correlated |
p |
an |
r2 |
the fraction of variation shared between the |
equal_var |
a |
a numeric matrix of nrow(reference)
rows and p
columns
Eric Coissac
Christelle Gonindard-Melodelima
1 2 3 4 5 | sim1 <- simulate_matrix(25,10)
class(sim1)
dim(sim1)
sim2 <- simulate_correlation(sim1,20,0.8)
corls(sim1, sim2)^2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.