Description Usage Arguments Details Value Author(s) Examples
View source: R/generate.data.R
Simulate multivariate normal data
1 2 3 4 5 6 7 | generate.data(
cor.matrix,
sds = c(1, 1),
means = c(0, 0),
names = c("y", "x"),
n = 100
)
|
cor.matrix |
Either a scalar (indicating the correlation between two variables) or a symmetrical matrix for a variance/covariance matrix |
sds |
The standard deviation of the variables |
means |
The means of the variables |
names |
The names of the variables |
n |
The desired sample size |
This function provides an easy way to simulate random multivariate normal data.
A data frame containing the simulated data
Dustin Fife
1 | generate.data(cor.matrix=.2, sds=c(10, 100), means=c(30, 1000), c("A", "B"), 200)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.