Message-ID: <B0F79B33-56BB-4B4E-AD58-6D947230D623@gmail.com>
Date: 2011-11-03T11:54:48Z
From: Michele Mazzucco
Subject: Fit continuous distribution to truncated empirical values
Hi all,
I am trying to fit a distribution to some data about survival times.
I am interested only in a specific interval, e.g., while the data lies in the interval (0,...., 600), I want the best for the interval (0,..., 24).
I have tried both fitdistr (MASS package) and fitdist (from the fitdistrplus package), but I could not get them working, e.g.
fitdistr(left, "weibull", upper=24)
Error in optim(x = c(529L, 528L, 527L, 526L, 525L, 524L, 523L, 522L, 521L, :
L-BFGS-B needs finite values of 'fn'
In addition: Warning message:
In dweibull(x, shape, scale, log) : NaNs produced
Am I doing something wrong?
Thanks,
Michele
p.s. I have seen similar posts, e.g., http://tolstoy.newcastle.edu.au/R/help/05/02/11558.html, but I am not sure whether I can apply the same approach here.