Stan examples of using fft

The fft and inv_fft will be in the next release. I’m wondering if anyone could put together Stan code to show distribution convolutions or other examples? I’m no expert with these - let me know if the following things even make sense! - but interested in the applications and how this would look in Stan.

  • GP speed ups from Grid based gaussian process speedup - #3 by pgree
  • Convolution of probability distributions
    • Signal processing
    • Impulse response. Convolution of dirac delta “impulse” and a distribution. These are interesting in Economics and Marketing. Say you have a steady state and it is perturbed by an external force. How does that external force propagate through the steady state system over time? Supply shocks in Economics such as oil price shock or demand shocks such as interest rate changes. In Marketing, this could be introduction of advertising (as a demand shock) and how this effects sales.

@pgree @WardBrian @Bob_Carpenter


Bob and I have been working on an implementation of the phase retrieval approach described in this paper: Optica Publishing Group

The model in Stan is pretty simple aside from some indexing logic around the “beamstop” described, and it optimizes well in Stan. We’re writing a case study up but I’m not sure if it will be ready in time to say link from the release notes. We haven’t taken the time to really evaluate sampling yet, but that should also be interesting


I would be happy to write a 1D and/or 2D deconvolution case study or something similar. Does anybody know of some simple open source data we could use? Some classic 1D examples include gamma ray detectors and early 1900s sound recording equipment with resonant frequencies (Deconvolution)