[R] fft: characteristic function to distribution

2008-09-08 Thread Jindan Zhou
Hello members! This question had been posted by Thomas Steiner in May, but I couldn't locate any followups thereafter, see: https://stat.ethz.ch/pipermail/r-help/2008-May/161483.html I want to raise up this question in a (hopefully) even simpler way: Given a random variable X, it's characteristi

Re: [R] fft: characteristic function to distribution

2008-05-13 Thread Thomas Steiner
Matthias Kohl was so kind and provided me the following lines in this issue: library(distrEx) 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

Re: [R] fft: characteristic function to distribution

2008-05-07 Thread Thomas Steiner
Thank you Prof Ripley for your answer. > > The characteristic function is the inverse Fourier transform of the > > distribution function. The characteristic function of a normaly > > distributed random variable is exp(-t^2/2). > > > > The fft is a discrete Fourier transforn, not a continuous one.

Re: [R] fft: characteristic function to distribution

2008-04-30 Thread Prof Brian Ripley
On Wed, 30 Apr 2008, Thomas Steiner wrote: The characteristic function is the inverse Fourier transform of the distribution function. The characteristic function of a normaly distributed random variable is exp(-t^2/2). The fft is a discrete Fourier transforn, not a continuous one. Further in e

[R] fft: characteristic function to distribution

2008-04-30 Thread Thomas Steiner
The characteristic function is the inverse Fourier transform of the distribution function. The characteristic function of a normaly distributed random variable is exp(-t^2/2). x=seq(-2,2,length=100) fft(pnorm(x),inverse=T)/length(x) exp(-x^2/2) Why aren't the inverse fft and the mentioned functio