[R] Distribution fitting problem

Dieter Menne dieter.menne at menne-biomed.de
Wed Nov 2 14:23:13 CET 2005


Mark Miller <mmiller <at> nassp.uct.ac.za> writes:

> 
> I am using the MASS library function 
> 
> fitdistr(x, dpois, list(lambda=2))
> 
> but I get 
> 
> Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
>         Function cannot be evaluated at initial parameters
> In addition: There were 50 or more warnings (use warnings() to see the first 
> 50)
> 

The docs say:

For the following named distributions, reasonable starting values will be 
computed if start is omitted or only partially specified: cauchy, gamma, 
logistic, negative binomial (parametrized by mu and size), t and weibull. 

dpois is not among them, so you probably have to provide reasonable starting 
values for the parameters.

Dieter




More information about the R-help mailing list