Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Estimating Weibull density parameters (error: "...initial value in 'vmmin' is not finite")

I am trying to estimate the shape and scale of a data set.
I used two different ways and for both I got an error message:

First, I tried by moments using the survey package:

survreg(Surv(all.ws)~1, dist="weibull")

I got the error message:

invalid survival times for this distribution

Second, I tried using fitdistr() function:

fitdistr(all.ws, densfun=dweibull, start=list(scale=1, shape=2))    

I got an error message:

Error in optim(x=c(2.2, 2.1,1.9....:
initial value in 'vmmin' is not finite

What is wrong with what I am doing?

like image 810
eliavs Avatar asked Jan 11 '11 10:01

eliavs


1 Answers

A google search "fitdistr Weibull Error" shows this exact question was discussed a year ago on the R-help mailing list: http://r.789695.n4.nabble.com/Problems-with-fitdistr-td1334772.html

Some points from that link:

  • zeros in your data will cause problems

  • use pelwei() function from package lmom

like image 66
Prasad Chalasani Avatar answered Sep 19 '22 17:09

Prasad Chalasani