Multivariable Random Uniform data

Share:

Description

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

Usage

1
randunif(n, mu, Cov, Q)

Arguments

n

the number of rows of observations in the dataset

mu

a vector containing the column means of the dataset

Cov

a covariance matrix

Q

an optional orthogonal 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

1
2
3
4
5
6
## 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 <- randunif(n = 100, mu = mu, Cov = covmatr)
head(sim.dat)