[R] question on integrate function & request for consultant

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Mar 5 18:03:35 CET 2004


You are trying to integrate a discontinous function, and the answer is 
+Inf.  So the message is correct.

An ECDF is one to the right of the largest data point.  I wonder what you 
really want to do.

On Fri, 5 Mar 2004, s viswanath wrote:

> Dear R helpers,
> 
> i am using the ecdf(emp. cumulative distribution function,and am getting the following error on daily returns of stock data (about 2000 data points). I am not sure what this means, I would expect the result of the code to be 1  (the integral from -infinity to +infinity  of the emp. cumulative distribution). Also when I try to integrate a smaller subset(from say 0 to 1, i get an incorrect result).
> 
> does anyone have any suggestions on a possible  error in my formula?
> 
> 
> >integrate(ecdf(ret),-Inf,Inf)
> Error in integrate(ecdf(ret), -Inf, Inf) : 
>         the integral is probably divergent
> 
> 
> Also I am looking to hire a statistical consultant for a few hours to help with a project that I am working on.
> 
> Please contact me via email at ru68y7s at myrealbox.com
> 
> Thank you ,
> 
> Sri Viswanath
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list