Grokbase Groups R r-help July 2003
FAQ
I have the following problem:

I have a vector x of data (0<x<=1 ) with
a U-shaped histogram and try to fit a beta
distribution using fitdistr. In fact,
hist(rbeta(100,0.1,0.1)) looks a lot like
my data.

The equivalent to
the example in the manual
sometimes work:
a <- rbeta(100,0.1,0.1)
fitdistr(x=a, "beta", start=list(shape1=0.1,shape2=0.1))1)
shape1 shape2
0.09444627 0.12048753
(0.01120670) (0.01550129)

but sometimes does not:
a <- rbeta(100,0.1,0.1)
fitdistr(x=a, "beta", start=list(shape1=0.1,shape2=0.1))1)
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
Function cannot be evaluated at initial parameters

Unfortunately, my data fall in the second case

I've searched for any weird value that be present in the
cases in which fitdistr exits with the error message, but
could not find any.

Any help?
(please if anyone answers be sure to answer to my address as well,
I cannot subscribe to the list)

Thanks

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 6 | next ›
Discussion Overview
groupr-help @
categoriesr
postedJul 4, '03 at 4:16p
activeJul 6, '03 at 4:07p
posts6
users3
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase