Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

randnor

Multivariable Random Normal data


Description

Generate a simulated multivariable random normally distributed dataset using the method of Cholesky Decomposition.

Usage

randnor(n, mu, Cov)

Arguments

n

the number of rows of observations in the dataset

mu

a vector of length m containing the column means of the dataset

Cov

an m x m covariance matrix

Value

A simulated matrix of values based on the input parameters is returned.

References

Rizzo M. L., "Statistical Computing with R", Chapman & Hall/CRC (2007)

Examples

## Simulated data based on the iris dataset
mu <- c(rep(0, 4))
covmatr <- matrix(c(0.7, -0.04, 1.3, 0.5, -0.04, 0.2, -0.3, -0.1,
1.3, -0.3, 3.1, 1.3, 0.5, -0.1, 1.3, 0.6), ncol = 4)
sim.dat <- randnor(n = 100, mu = mu, Cov = covmatr)
head(sim.dat)

apricom

Tools for the a Priori Comparison of Regression Modelling Strategies

v1.0.0
GPL-2
Authors
Romin Pajouheshnia [aut, cre], Wiebe Pestman [aut], Rolf Groenwold [aut]
Initial release
2015-11-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.