View source: R/random_values_simulation.R
Generates random values from a normal and puts them in a matrix | R Documentation |
Generates random values from a normal and puts them in a matrix.
matrnorm(n, p, seed = NULL)
n |
The sample size, the number of rows the matrix will have. |
p |
The dimensionality of the data, the nubmer of columns of the matrix. |
seed |
If you want the same to be generated again use a seed for the generator, an integer number. |
How many times did you have to simulated data from a (standard) normal distribution in order to test
something? For example, in order to see the speed of logistic_only
, one needs to generate
a matrix with predictor variables. The same is true for other similar functions. In sftests
,
one would like to examine the typer I error of this test under the null hypothesis.
By using the Ziggurat method of generating standard normal variates, this function is really fast when you want to generate big matrices.
An n x p matrix with data simulated from a standard normal distribution.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>
rvmf, Rnorm, rmvnorm, rvonmises
x <- matrnorm(100, 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.