Skip to contents

Generate correlated Gaussian errors based on an autoregressive(1) covariance structure.

Usage

ar1_errors(n, rho)

Arguments

n

Number of samples.

rho

Correlation.

Value

A vector of simulated errors with length n.

Examples

errs <- ar1_errors(n = 100, rho = 0.7)