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?