Skip to contents

Generate correlated Gaussian errors based on a block-dependence covariance structure with n_blocks (approximately) equally-sized blocks.

Usage

block_errors(n, n_blocks = 3, rho = 0.8)

Arguments

n

Number of samples.

n_blocks

Number of blocks.

rho

Correlation. Must be a scalar or vector of length k.

Value

A vector of simulated errors with length n.

Examples

errs <- block_errors(n = 100, n_blocks = 3, rho = 0.7)