block_errors: Generate block-correlated Gaussian errors.

View source: R/dgp-lib-errors.R

block_errorsR Documentation

Generate block-correlated Gaussian errors.

Description

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)


Yu-Group/dgpoix documentation built on June 3, 2022, 1:40 a.m.