Description Usage Arguments Value Examples
View source: R/generate_normal.R
Creates a toy data set S = (X) where the columns of X are sampled from an independent Gaussian distribution with mean μ_i and standard deviation σ_i, i.e. N(μ_i, σ_i^2). The final dimension will be n \times p, with the number of data points n to be specified.
1 | generate_X(n = 100, mu = rep(0, 10), sigma = rep(1, 10))
|
n |
The desired number of data points in the data set. |
mu |
A p-dimensional vector of means for μ. |
sigma |
A p-dimensional vector of non-negative standard deviations for σ. |
An n \times p dimensional data frame given by S = (X). In the default case, the columns X_i are sampled from N(0,1), n = 100 and p = 10.
1 2 3 | generate_X()
generate_X(n = 40, mu = 1:10, sigma = rep(1, 10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.