Hi All,
First of all, thank you for all the effort in putting together all this material for Julia, this is extremely useful.
I am experiencing something rather weird. I am using the routines in estspec.jl, trying to replicate the example on the website. I have the following code
T=150
rho=-0.9
e=randn(T)
x=[e[1]]
tmp=e[1]
for t=2:T
tmp=rho*tmp+e[t]
push!(x,tmp)
end
w,fw=ar_periodogram(x,"hamming",65)
semilogy(w,fw)
and get the following message
LoadError: DimensionMismatch("arrays could not be broadcast to a common size")
The problem comes from the following line is estspec.jl
I_w = I_w ./ abs(1 - phi .* exp(im.*w)).^2
In fact I_w has dimension (73,) while w has dimension (75,). The problem originates from the convolution in the smooth function.
Surprisingly enough if instead of using a bandwidth of 65, I use 63 or 67, everything works fine, but 61 or 69 fail !
Also note that this occurs with all types of window.
Is there anything wrong I am doing, or something trivial I am missing?
Thank you in advance
Fabrice