[R] Fitting a Weibull/NaNs

Duncan Murdoch dmurdoch at pair.com
Mon Oct 20 14:01:43 CEST 2003


On 19 Oct 2003 21:18:09 -0700, you wrote:

>The problem seems to be that some of the values of d$Age.Month are 0
>and since the Weibull always has a value of 0 at 0, the log likelihood
>comes out insane. (I'm getting 0 values due to quantization error). 
>OTOH when I remove the 0 values it works great, but that seems
>kind of ad hoc. Is there some standard fix for this? 

A standard fix is to replace zeros with some small positive number,
but this isn't entirely satisfactory.  It's definitely worthwhile
doing a sensitivity test:  e.g. do you get essentially the same answer
using 0.01 and 0.0001 for the replacement value?  If not, you might
want to question the use of a model that predicts zero density in an
area where you've got observations.

Duncan Murdoch




More information about the R-help mailing list