// Estimate autocovariance
L=ltp_CR(n); gk=acf(x,L,0); gk=(rev(gk)|1|gk).*(x'x/n);
is there a way to convert the above code in Gauss to R?
Thanks
I am planning to calculate the spectral density in R without using canned functions. Unfortunately, I don't know how to calculate L as in the code in R