Compute an autocorrelation matrix.
corr_matrix(diagonal, ksi)
Arguments
- diagonal
a numerical vector corresponding to the diagonal.
- ksi
a numerical value, related to the correlation.
Value
a symmetric matrix.
Examples
### Test 1 : weak autocorrelation
ksi <- 1
diagVar <- abs(rnorm(100,50,5))
Sigma <- corr_matrix(diagVar,ksi^2)
persp(Sigma)
### Test 2 : strong autocorrelation
ksi <- 0.2
diagVar <- abs(rnorm(100,50,5))
Sigma <- corr_matrix(diagVar,ksi^2)
persp(Sigma)