corrUnif: Generate correlated Uniform(0,1) random variables

View source: R/misc.R

corrUnifR Documentation

Generate correlated Uniform(0,1) random variables

Description

Generate correlated Uniform(0,1) random variables

Usage

corrUnif(n, Rho)

Arguments

n

the desired number of sets of correlated Uniform random variables to generate

Rho

the desired correlation matrix

Value

a matrix containing the realizations in the rows

Examples

n <- 1000
q <- 10
X <- corrUnif(n,Rho = (10/20)^abs(outer(1:q,1:q,"-")))

Rho
cor(X)

gregorkb/semipadd2pop documentation built on Oct. 2, 2022, 1:37 p.m.