data.gen.norm: Generate correlated normal variates

View source: R/data_gen.R

data.gen.normR Documentation

Generate correlated normal variates

Description

Generate correlated normal variates

Usage

data.gen.norm(n, mu = rep(0, 2), sd = rep(1, 2), r = 0.6, sigma)

Arguments

n

The data length to be generated.

mu

A vector giving the means of the variables.

sd

A vector giving the standard deviation of the variables.

r

The target Pearson correlation, default is 0.6.

sigma

A positive-definite symmetric matrix specifying the covariance matrix of the variables.

Value

A matrix of correlated normal variates


synthesis documentation built on Nov. 2, 2023, 5:51 p.m.