Gildas Mazo
2012-Mar-06 18:47 UTC
[R] Numerical Inversion of Cumulative Distribution Function
Dear R users, Given a user-defined cumulative distribution function F, I want to compute F^{-1}(x). How is that possible with R? Best Regards, -- Gildas Mazo PhD student MISTIS team at INRIA Grenoble, France [[alternative HTML version deleted]]
Dimitris Rizopoulos
2012-Mar-06 19:45 UTC
[R] Numerical Inversion of Cumulative Distribution Function
Check function uniroot(). I hope it helps. Best, Dimitris On 3/6/2012 7:47 PM, Gildas Mazo wrote:> Dear R users, > > Given a user-defined cumulative distribution function F, I want to compute F^{-1}(x). How is that possible with R? > > Best Regards, >-- Dimitris Rizopoulos Assistant Professor Department of Biostatistics Erasmus University Medical Center Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014 Web: http://www.erasmusmc.nl/biostatistiek/
David Winsemius
2012-Mar-06 22:35 UTC
[R] Numerical Inversion of Cumulative Distribution Function
On Mar 6, 2012, at 1:47 PM, Gildas Mazo wrote:> Dear R users, > > Given a user-defined cumulative distribution function F, I want to > compute F^{-1}(x).Isn't this quantile()? (But pay attention to the type .... some say to use type=1.) Alternatively: If q = CDF(x) then generate a matrix of independently random (q,x) pairs on a large sample. Wouldn't the matrix of (x,q) pairs then be something to work with? (This has been asked several many times on R-help, so you could practice your use of the search facilities. Here's a MarkMail link: http://markmail.org/search/?q=list%3Aorg.r-project.r-help+inverse+cumulative+distribution -- David Winsemius, MD West Hartford, CT