FFT/IFT

Questions and discussions on Time Series Analysis

FFT/IFT

Postby atrad » Wed Sep 17, 2008 10:05 am

I would like to obtain the covariogram from the periodogram for a time series. To do this I first use rtoc using twice the number of observations, then apply fft, followed by cmult(scale=1/2*%nobs) and then ift. This I scale by 1/2*%pi. I appear to obtain the covariogram but it seems to only start with the first autocovariance. Will I never obtain the contemporaneous variance this way?
atrad
 
Posts: 5
Joined: Mon Apr 30, 2007 1:45 pm

Re: FFT/IFT

Postby TomDoan » Wed Sep 17, 2008 10:53 am

atrad wrote:I would like to obtain the covariogram from the periodogram for a time series. To do this I first use rtoc using twice the number of observations, then apply fft, followed by cmult(scale=1/2*%nobs) and then ift. This I scale by 1/2*%pi. I appear to obtain the covariogram but it seems to only start with the first autocovariance. Will I never obtain the contemporaneous variance this way?


The covariance should be in entry 1. The only scaling needed in this sequence is 1.0/actual observations. The 1/(2pi) is rather specific to a final estimate of the spectral density. The following sequence computes the covariogram using frequency domain operations and gives the same results as the cross instruction with the covariances option.

Code: Select all
seed 3439
set x 1 100 = %ran(1.0)
diff(center) x / cx
freq 1 2*%freqsize(100)
rtoc
# cx
# 1
fft 1
cmult(scale=1.0/100.0) 1 1
ift 1
cprint 1 10 1
corr(covar,method=yule,number=9) cx
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Other Time Series Analysis

Who is online

Users browsing this forum: No registered users and 1 guest