Re: [R] fft: characteristic function to distribution

From: Thomas Steiner <>
Date: Tue, 13 May 2008 11:22:25 +0200

Matthias Kohl was so kind and provided me the following lines in this issue:

chf <- function(t, D){
  E(D, function(x){exp(1i*t*x)}, useApply = FALSE) }

## Normalverteilung
D <- Norm()
t <- seq(-3, 3, by = 0.05)

chf.norm <- sapply(t, chf, D = D)
chf.exakt <- exp(-t^2/2)
chf.diff <- chf.norm - chf.exakt


This is nice BUT:
* Only built-in distributions can be used

Apart from this it was exactly what i was looking for: I know the characteristic function and want to get the distribution. (My porposal was to use fft(,inverse=T).)
Any help appreciated,
Thomas mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 13 May 2008 - 09:39:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 13 May 2008 - 10:30:36 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive