ivory4 wrote:Thanks. It seems that this one is not included in 7.3's textbook example folder.
ivory4 wrote: why it seems much smoother in @armaspectrum calculated spectrum than @spectrum.
I am asking because the Manual says that @armaspectrum calculates transfer function which I thought is a function of Cosine? Like AR(1) case 1/(1+phi^2+2phi*cos(w))? That's why it is smoother?
open data lgdp.txt
calendar(q) 1947
data(format=free,org=columns) 1947:01 1998:02 lgdp
diff lgdp / dlgdp
compute obs=206
* ARMA(2,2) Record the coefficients
boxjenk(ar=2,diffs=1,ma=2,maxl,constant,define=lgdpeq) dlgdp
compute phi1=%beta(2),phi2=%beta(3),theta1=%beta(4),theta2=%beta(5),se=%seesq
*Analytical form
compute cst1 = 1+theta1^2-2*theta2+theta2^2
compute cst2 = 1+phi1^2+2*phi2+phi2^2
set time / = t
set cosine / = cos((time-1)/obs*2*%pi)
set nume / = cst1+2*(theta1+theta1*theta2)*cosine+4*theta2*cosine*cosine
set deno / = cst2+2*(phi1*phi2-phi1)*cosine -4*phi2^2*cosine*cosine
set spec / = se/(2*%pi)*nume/deno
set frequencies / = (time-1)/104
scatter(style=lines,header="Spectrum of Differenced Yt",hlabel="Fractions of pi") 1
# frequencies spect 1 104
TomDoan wrote:
If what you want is a confidence interval for the spectral density estimated indirectly through an ARMA model, that is discussed on page 334 of Hannan's Multiple Time Series with the comment: "This is a relatively complicated expression reflecting, it appears, the use of a method of estimation not basically designed for spectral estimation."
Return to Other Time Series Analysis
Users browsing this forum: No registered users and 2 guests