Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-11-01 Thread Manoranjan Muthusamy
gt; X <- c(101, 103, 107, 111) > > f <- ecdf(X) > > inv_f <- inv_ecdf(f) >> inv_f(seq(0, 1, by=1/8)) >[1] NA NA 101 102 103 105 107 109 111 > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > > >

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-11-01 Thread William Dunlap
lap tibco.com From: Manoranjan Muthusamy [mailto:ranjanmano...@gmail.com] Sent: Friday, November 01, 2013 4:38 AM To: William Dunlap; dulca...@bigpond.com Cc: Rui Barradas; r-help@r-project.org Subject: Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve Th

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-11-01 Thread Manoranjan Muthusamy
Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf > > Of Manoranjan Muthusamy > > Sent: Thursday, October 31, 2013 6:18 PM > > To: Rui Barradas > > Cc: r-help@r-project.org > > Subject: Re: [R] Extracting values f

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Duncan Mackay
...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Manoranjan Muthusamy Sent: Friday, 1 November 2013 11:18 To: Rui Barradas Cc: r-help@r-project.org Subject: Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve Thank you, Barradas. It works

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread William Dunlap
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Manoranjan Muthusamy > Sent: Thursday, October 31, 2013 6:18 PM > To: Rui Barradas > Cc: r-help@r-project.org > Subject: Re: [R] Extracting values from a ecdf (empirical cumulative > dist

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Manoranjan Muthusamy
Thank you, Barradas. It works when finding y, but when I tried to find x using interpolation for a known y it gives 'NA' (for whatever y value). I couldn't find out the reason. Any help is really appreciated. Thanks, Mano On Thu, Oct 31, 2013 at 10:53 PM, Rui Barradas wrote: > Hello, > > As fo

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Rui Barradas
Hello, As for the problem of finding y given the ecdf and x, it's very easy, just use the ecdf: f <- ecdf(rnorm(100)) x <- rnorm(10) y <- f(x) If you want to get the x corresponding to given y, use linear interpolation. inv_ecdf <- function(f){ x <- environment(f)$x y <- env

[R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Manoranjan Muthusamy
Hi R users, I am a new user, still learning basics of R. Is there anyway to extract y (or x) value for a known x (or y) value from ecdf (empirical cumulative distribution function) curve? Thanks in advance. Mano. [[alternative HTML version deleted]] _