On 7/21/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Fri, 21 Jul 2006, Valentin Dimitrov wrote:
>
> > Dear Leaf,
> >
> > I modified your code as follows:
> >
> > gamma.fun <- function(mu,sd,start=100)
> > {
> > f.fn <- function(alpha)
> > {abs(sd^2-mu^2/(gamma(1+1/alpha))^2*(gamma(1+2/alpha)-(
re is
> no root found within the interval. I was not able to
> solve this problem.
>
> Thanks!
>
> Leaf
>
>
>
>
>
> - Original Message -
>
> From: Thomas Lumley, [EMAIL PROTECTED]
> Sent: 2006-07-21, 09:35:11
> To: Valentin Dimitrov,
n. The error seems
to me like there is no root found within the interval. I was not able to solve
this problem.
Thanks!
Leaf
- Original Message -
From: Thomas Lumley, [EMAIL PROTECTED]
Sent: 2006-07-21, 09:35:11
To: Valentin Dimitrov, [EMAIL PROTECTED]
Subject: Re: [R] W
On Fri, 21 Jul 2006, Valentin Dimitrov wrote:
> Dear Leaf,
>
> I modified your code as follows:
>
> gamma.fun <- function(mu,sd,start=100)
> {
> f.fn <- function(alpha)
> {abs(sd^2-mu^2/(gamma(1+1/alpha))^2*(gamma(1+2/alpha)-(gamma(1+1/alpha))^2))}
> alpha <- optim(start, f.fn)
> beta <- mu/gamma(
Dear Leaf,
I modified your code as follows:
gamma.fun <- function(mu,sd,start=100)
{
f.fn <- function(alpha)
{abs(sd^2-mu^2/(gamma(1+1/alpha))^2*(gamma(1+2/alpha)-(gamma(1+1/alpha))^2))}
alpha <- optim(start, f.fn)
beta <- mu/gamma(1+1/alpha$par)
return(list=c(a=alpha$par,b=beta));
}
Now
: William Asquith, [EMAIL PROTECTED]
Sent: 2006-07-17, 16:18:31
To: Leaf Sun, [EMAIL PROTECTED]
Subject: Re: [R] Weibull distribution
Do not have answer per se, but if you are seeking some
comparisons--
try three parameter Weibull as implemented by the lmomco package
Hi all,
By its definition, the mean and variance of two-par. Weibull distribution are:
(www.wikipedia.org)
I was wondering, if given mean and sd. could we parameterize the distribution?
I tried this in R.
gamma.fun <- function(mu,sd,start=100)
{
f.fn <- function(alpha)
sd^2-mu^2/(