Learn R Programming

varband (version 0.9.0)

sample_gen: Generate random samples.

Description

Generate n random samples from multivariate Gaussian distribution N(0, (L^TL)^-1)

Usage

sample_gen(L, n)

Arguments

L
p-dimensional inverse Cholesky factor of true covariance matrix.
n
number of samples to generate.

Value

returns a n-by-p matrix with each row a random sample generated.

Examples

Run this code
set.seed(123)
true <- varband_gen(p = 50, block = 5)
x <- sample_gen(L = true, n = 100)

Run the code above in your browser using DataLab