Message-ID: <41A1717E.30206@pdf.com>
Date: 2004-11-22T04:56:30Z
From: Sundar Dorai-Raj
Subject: rhyp function from fBasics
In-Reply-To: <200411220422.iAM4MUk15900@gator.dt.uh.edu>
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