turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- Fourier transform

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2015 11:02 AM

I have a time series where I want to do a real Fourier transform

Since the data has missing values, I cannot use a FFT which requires equidistant data.

PROC SPECTRA either use the classical cool-Tukey when data=2**n or a chirp-Z, but since Proc spectra does not require the time information, this is not the way. Anyone with experience of a real FT in SAS?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2015 05:39 PM

Hello -

Not sure I completely understand this question but here are some pointers which may be useful:

- Spectral Density Analysis in PROC TIMESERIES: http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_timeseries_sec...
- FFT Function in SAS/IML to perform finite Fourier transformation: http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/viewer.htm#langref_sect80.htm

Thanks,

Udo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2015 07:45 PM

Except that the FFT function in SAS/IML won't work with the missing value. It requires a vector of nonmissing.

You could interpolate or otherwise model the signal at the missing values, and then take an FFT of the interpolated signal.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2015 08:14 PM

Rick Wicklin wrote:

You could interpolate or otherwise model the signal at the missing values, and then take an FFT of the interpolated signal.

PROC EXPAND is designed to aide with this.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-25-2015 12:25 AM

Yes, and it is what I have done. But this is not the best way. The best way is to do a real Fourier transform (not a FFT). With modern computers, computer power does not matter much. Furthermore irregular sampled measures may even break the nyquist limit. However that demands a Fourier transform which also takes the time in account. The FFT in proc spectra does not. It seems that SAS has some limits in its time series analysis. I may have to end up in matlab

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-25-2015 08:59 AM

I haven't thought about this stuff in many years, but I seem to recall that the real FT is just the integral of f(t)sin(wt) and f(t)cos(wt). I think you are saying that you want to integrate these functions over nonuniform collection of t values. There are various numerical integration schemes, depending upon how you want to model the function on the interval [t_i, t_{i+1}]. The simplest model is the piecesise linear model, which is equivalent to integration via the trapezoid rule. See http://blogs.sas.com/content/iml/2011/06/01/the-trapezoidal-rule-of-integration.html The formula is easy and does not require uniform spacing of the {t_i}.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-24-2015 03:30 AM

That may be a solution. Hopefully one day SAS will extend PROC SPECTRA to do that. It will help many doing times series analysis of real data with missing data. Furthermore it has been shown that irregular sampled data may break the nyquist limit so there is many advantages of using a real Fourier transform and not the FFT or some equivalent.