[R] rhyp function from fBasics
Sundar Dorai-Raj
sundar.dorai-raj at pdf.com
Mon Nov 22 05:56:30 CET 2004
Erin Hodgess wrote:
> Dear R People:
>
> There is a function from the fBasics library to get the probability
> and quantiles for the hyperbolic probability function.
>
> Is there one that will estimate parms of the hyperbolic probability
> function from a data set, please?
>
> Thanks in advance!
>
> Sincerely,
> Erin Hodgess
> mailto: hodgess at gator.uhd.edu
> R Version 2.0.1 windows
>
Erin,
You can use MASS::fitdistr to do this, I believe.
library(fBasics)
library(MASS)
x <- rhyp(1000, alpha = 2, beta = 1, delta = 1)
fitdistr(x, dhyp, list(alpha = 1, beta = 0.5, delta = 0.5))
--sundar
More information about the R-help
mailing list