similar to: fft: from characteristic funtion to density function

Displaying 20 results from an estimated 5000 matches similar to: "fft: from characteristic funtion to density function"

2008 Apr 30
2
fft: characteristic function to distribution
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 function the same? Thanks for help, Thomas
2005 Dec 23
2
convolution of the double exponential distribution
Is there any R function that computes the convolution of the double exponential distribution? If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from 0 to Inf for any value of q and for any positive integer n? I need to perform the integration within a function with q and n as arguments. The function integrate() is giving me this message: "evaluation of function gave a
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
Hi everyone, I am new to R, but it's really great and helped me a lot! But now I have 2 questions. It would be great, if someone can help me: 1. I want to integrate a normal distribution, given a median and sd. The integrate function works great BUT the first argument has to be a function so I do integrate(dnorm,0,1) and it works with standard m. and sd. But I have the m and sd given.
2008 May 14
4
Heatmap.2 - eliminate cluster and dendrogram
Using the heatmap.2 function, I am trying to generate a heatmap of a 2 column x 500 row matrix of numeric values. I would like the 1st column of the matrix sorted from the highest to the lowest values - so that the colors reflected in the first column of the heatmap (top to bottom) go from red to green. After sorting the matrix (z), I tried the following command, but the data remains
2008 May 21
2
\S4method in combination with "[" and "[<-"
Dear developers, We want to use "\S4method" to document new S4-methods for "[" and "[<-". We use this for other functions/methods and it works without any problem, but in case of "[" and "[<-" we didn't manage to bring this to work. The problem occurs in the development version of our package "distrSim" which can be found
2006 Jan 03
1
S4 default initialization: unwanted NULL
The default initialization for slots of class "factor" and "data.frame" gives NULL. This seems odd, since those slots can't ever be set to NULL by the user. I would expect zero-length instances of factor and data.frame. Here is an example: setClass("FOO", representation(a="factor", b="data.frame", c="numeric")) [1] "FOO"
2008 Dec 14
2
Sweave/Rweave and results="verbatim"
Hello, in a Rnw-file I have this used stuff to try out tex-results... ============================== <<>>>= texme <- function() cat( "{\\bf Hallo, das ist voll fett!}\n" ) @ <<results="verbatim">>= texme() @ ============================== I used this command: "R CMD Sweave example.Rnw" and got this error:
2007 Feb 09
2
RE gap statistic in cluster analysis
Has anyone implemented Tibrishani's gap statistic in R or S plus? If so I would greatly appreciate the relevant script file. Any help will be much appreciated Kind regards Dr Graham Leask Economics and Strategy Group Aston Business School Aston University Aston Triangle Birmingham B4 7ET Tel: Direct line 0121 204 3150 email g.leask@aston.ac.uk [[alternative HTML version deleted]]
2006 Feb 09
4
New user: Custom probability distribution
Hello, Given a probability function: p(x) = 12 / (25(x+1)) , x=0, 1, 2, 3 we generate the following values: C1 C2 0 0.48 1 0.24 2 0.16 3 0.12 Now, I'm supposed to create 50 random values using this table. In MiniTab, I simply selected Calc -> Random Data -> Discrete, and selected the columns, and it created 50 random values in a new column.[1] How do I do the
2006 Jun 30
5
median of gamma distribution
Doese anyone know a R function to find the median of a gamma distribution? [[alternative HTML version deleted]]
2005 Nov 01
4
S4 classes in existing packages
R-devel, I'm interested in looking at some examples of existing R packages that rely heavily on S4 classes to get a feel for varying styles and package organization techniques. Could you recommend any packages that might serve as a good starting point? Thanks in advance, Jeff
2005 Nov 01
4
S4 classes in existing packages
R-devel, I'm interested in looking at some examples of existing R packages that rely heavily on S4 classes to get a feel for varying styles and package organization techniques. Could you recommend any packages that might serve as a good starting point? Thanks in advance, Jeff
2003 Mar 11
3
fft help
Hi R-users: I want to know if there is an easy way to obtain a Fourier Transform form a vector or an array (just like fft does), but with a more density base. I mean, if I have a vector of 512 of length, I want the Fourier Transform to be 1024, or 2048, etc, in length (de u domain). Or should I modify the fft C code to do that? If I want to modify the precision of the fft function, which
2010 Jun 06
1
Robust Asymptotic Statistics (RobASt)
Hi all, Other than: http://www.stamats.de/F2006.r Are there other good simple examples out there of using the ROptRegTS package (part of the RobASt project)? I'm hoping to plug it in for multivariate regression. Or is this not a good idea? Just trying to find out how it compares to rlm, lts, glm, etc. Hopefully this makes sense, I'm new to the world of statistics and R. Thanks! St0x
2009 Apr 10
1
FFT function
Hi, A very simple question. I know that the Fourier transform of a Laplace distribution, with zero mean and variance 2b^2, is equal to 1/(1+(tb)^2). Therefore, the Fourier transform is a positive function (actually is always between 0 and 1). BUT, if I use the fft(alpha) function of R, where alpha is a vector containing 128 values of the probability density function from -2 to 2, I get negative
2006 Nov 18
1
Questions regarding "integrate" function
Hi there. Thanks for your time in advance. I am using R 2.2.0 and OS: Windows XP. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt"
2005 Jul 26
0
a question about fft ( fast fourier transform)
Dear listers In R, if I have a sequence x(t), t=1,...N, fft(x) is actually giving us sum(x(t)exp(-i*omega*t)) at fourier frequency omega= 2*pi*i/N, i=0,1,...(N-1). The question is if I want to calculate sum(x(t)exp(-i*2*omega*t)), how can I do it? thanks a lot! ------------------------------- liyun (Lauren) Ma Dept of Statistics North Carolina State University
2009 Sep 29
1
fft with NA values
Hi List, I'm trying to perform some spectral analysis on a time series, but I've got a few data points missing, so they have NA values. Unfortunately, the fft function doesn't seem to like this, and gives a completely empty result. Other than making up values to fill in the gaps, is there any way I can get around this? Thanks in advance, Steve. PS I haven't spotted anything
2008 Jul 30
2
FFT - (STATS) - is this correct?
Hello, I have calculated the fourier transform of the series enclosed at the end of this message, by doing: library(stats) x <- readLines("file1.txt") x.num <- as.numeric(x) ft.x.num <- fft(x.num) My question is: why is the first value (Real) of ft.x.num that big? (954.833870) all the other values are much smaller. Am I doing something wrong? Could you please help me to
2004 Mar 11
5
fft question
Hi! I am using the fft() function the base package to transform some 1d signal. If I use this standar fucntion I get a very huge first fourier coeficient. I think this dues to the handling of the borders of the signal. Usually in fft especially in image processing the signal is simulated to be continuous by adding the signal several times periodically. My question is, is there some function