We need a new open thread. So, I figured I’d just post my R question of the day. I’ve persuaded myself that the “noise” in models and earth weather is stationary. Based on that, I’m now treating things as ergodic and averaging over periods. But that leads to a question:
Using “spectrum”, I easily create spectra for “p” batches of “n” month long time series of detrended temperature data. I can then average these spectra over the “p” batches. I can then plot, resulting in crummy looking graphs like these:

(The line is just an eyeball line to see if the decay rate is more or less linear.)
(The curved line happens to be the shape we’d expect if noise was AR1 with phi=0.85, but has no particular significance otherwise.)
I could, of course, proceed to do all sorts of things in the frequency domain. But my question is:
Is there a simple already existing built in function to transform the spectrum back into the time domain? (One that happens to match the convention used by spectrum with respect to 2’s and pi’s would be nice.)
Now: Open thread. Feel free to comment on the graphs, ask questions, suggest R code, advice on using fft to perform the inverse transform or whatever. All is welcome. But ideally, I am hoping for discussion on which pre-existing R models are particularly useful for transforming, windowing etc.
Disclaimer: I only fiddle occasionally with R.
All you have is the PSD? If so, not enough info to get a “signal” back out (all you’ve got is amplitudes with no phase information; the docs say phase is NULL for uni-variate series, true?). You can generate surrogates fairly easily from that by choosing random phases and doing an inverse FFT; not sure if this is what you are meaning to do.
Beta version of an R package for TISEAN
Sorry about that, here’s the link: R-TISEAN
I had done something last year involving fft’ing data, zeroing out unwanted frequencies, and transforming back to the time domain as a means of smoothing. I might have that code hiding somewhere in my disorganized archives.
jstults–
I don’t want phase information. I only want to get back the autocorrelation which also has no phase information.
Right now… I mostly want to look at stuff. But unlike lost of people who love to create forecasts, I am absolutely not trying to forecast. I am trying to put together argument to explain why standard errors describe the uncertainty in the sense of repeatability. Not in the sense of trying to forecast the future.
The package you may want to look at is “signal”
http://cran.r-project.org/
look at the packages.. signal
then at your GUI install packges signal
in your code library(“signal”)
Re: Chad (Mar 29 12:16), the signal package has ifft. not sure if that is what she wants
Steven/Chad–
Thanks. The names help!
Interesting post at Pielke, Sr.’s Climate Science on ground water extraction contribution to sea level rise. According to the article, it’s substantial, 0.8 mm/year with average sea level rise being ~3 mm/year. That isn’t included in, for example, Cazenave, et.al. as a factor. Assuming the number is correct, either ice sheets aren’t melting as fast, thermal expansion is lower or global isostatic rebound is less than thought or some combination of all three.