z_correlated_normal: Generate n copies of Z ~ N_{p}(0,Sigma), where Sigma_{jj} =...

View source: R/simulation_settings.R

z_correlated_normalR Documentation

Generate n copies of Z ~ N_{p}(0,\Sigma), where \Sigma_{jj} = 1, \Sigma_{jk} = \text{corr} for all j not equal to k.

Description

Generate n copies of Z ~ N_{p}(0,\Sigma), where \Sigma_{jj} = 1, \Sigma_{jk} = \text{corr} for all j not equal to k.

Usage

z_correlated_normal(n, p, corr)

Arguments

n

integer number of samples.

p

integer number of dimensions.

corr

float correlation in (-1,1).

Value

n by p matrix.


drape documentation built on April 3, 2025, 9:23 p.m.