This function generates a \(p \times p\) autocorrelated covariance matrix
with autocorrelation parameter rho. The variance sigma2 is
constant for each feature and defaulted to 1.
cov_autocorrelation(p, rho, sigma2 = 1)the size of the covariance matrix
the autocorrelation parameter. Must be less than 1 in absolute value.
the variance of each feature
autocorrelated covariance matrix
The autocorrelated covariance matrix is defined as: The \((i,j)\)th entry of the autocorrelated covariance matrix is defined as: \(\rho^{|i - j|}\).
The value of rho must be such that \(|\rho| < 1\) to ensure that
the covariance matrix is positive definite.