powered by
This function allows us to calculate the theoretical covariance matrix of a non-stationary AR(1) blocks process.
covmat_ar1blocks(n_total, n_block, phi, sigma2)
The theoretical covariance matrix of the AR(1) blocks process.
matrix
An integer indicating the length of the whole AR(1) blocks process.
integer
An integer indicating the length of each block of the AR(1) blocks process.
A double value for the autocorrection parameter \(\phi\).
double
A double value for the variance parameter \(\sigma ^2\).
Yuming Zhang
covmat1 = covmat_ar1blocks(n_total = 1000, n_block = 10, phi = 0.9, sigma2 = 1) covmat2 = covmat_ar1blocks(n_total = 800, n_block = 20, phi = 0.5, sigma2 = 2)
Run the code above in your browser using DataLab