Well, presumably you have the pmf and can create a matrix of the form: (where mypmf is your pmf)
x <- seq_len(1000) ## or whatever your discrete support sorted in increasing order ## for individual quantile q: max(x[cumsum(mypmf(x)) <= q] ) ## This probably could be vectorized for a vector of quantiles . I leave that to others both cleverer and more motivated than I. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Thu, Jun 25, 2015 at 8:59 AM, L... L... <mar.lam...@hotmail.com> wrote: > I thank all for your reply. My question was not well formulated. > I will do it again: > Suppose that the random variable X is discrete with probability mass function > (pmf) F (binomial, poisson, ....) not necessarily available in R. > Is there a general method to get the quantiles (as qbinom, qpois, .....) or > which is the method(s) used to get the quantiles (used in qbinom, qpois, > .....)? > Regards > ML > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.