Description Usage Arguments Value Examples
View source: R/generate_simulated_data.R
Generate a matrix of correlated variables
1 | generate_correlated_matrix(n, p, corr, constant_cov_matrix = T, mean = 0)
|
n |
number of observations |
p |
number of features/variables |
corr |
the correlation coefficient (-1 < r < 1) |
constant_cov_matrix |
should the value of corr be constant in the covariance matrix, or should corr be the average value in the covariance matrix. |
mean |
the mean value of the generated variables. |
an n x p matrix
1 2 | Subject <- generate_correlated_matrix(1, 100, corr = .75,constant_cov_matrix = TRUE)
Reference_Population <- generate_correlated_matrix(100, 100, corr = .75,constant_cov_matrix = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.