This is the function for generating an autoregressive covariance matrix.

gen_autoregressive(m, rho)

Arguments

m

Dimension of the matrix.

rho

Correlation coefficient.

Value

An autoregressive covariance matrix.

Examples

cov_mat <- gen_autoregressive(m = 6, rho = 0.5)