On Jan 3, 2012, at 7:24 AM, Gerhard wrote:

Hi,

I guess that my problem has an obvious answer, but I have not been able to
find it.

Suppose I create a custom function, consisting of two beta- distributions:

myfunction <- function(x) {
 dbeta(x,2,6) + dbeta(x,6,2)
}


Given the symmetry of the beta function, I suspect that dividing by two would make that a real distribution.

How can I calculate the quantiles of myfunction?

You could build a CDF using 'integrate'.


I have not seen any continous function treated in the docs, and applying the "quantile function" gives me an error (since it seems only to be defined on
lists and atoms).

There is also a family of packages, all of whose names begin with "distr". They provide a variety of facilities for developing new distributions, both discrete and continuous.

--

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to