Draw multivariate normal samples under a structured covariance
Source:R/longitudinal_sim.R
morie_mvn_with_covariance.RdDraw multivariate normal samples under a structured covariance
Usage
morie_mvn_with_covariance(
n,
p,
rng,
kernel = c("ar1", "independent", "compound", "toeplitz"),
rho = 0.5,
mean = NULL
)Arguments
- n
Number of samples.
- p
Dimension.
- rng
morie_sync_rng()environment.- kernel
One of
"independent","ar1","compound","toeplitz".- rho
Correlation parameter.
- mean
Optional length-p mean vector.