Re: [Rd] dweibull retuns NaN instead of Inf (PR#9080)

From: <ripley_at_stats.ox.ac.uk>
Date: Sat 15 Jul 2006 - 21:00:52 GMT


  This message is in MIME format. The first part should be readable text,   while the remaining parts are likely unreadable without MIME-aware tools.

--27464147-852712393-1152995865=:29235

Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-ID: <Pine.LNX.4.64.0607152148581.29235@gannet.stats.ox.ac.uk>

This is debatable: according to ?dweibull and ?dgamma both pdfs are defined with support (0, Inf), so in both cases the correct answer would appear to be 0.

This is in contrast to ?dexp which has the density defined on x >= 0.

It seems most references have the support as [0, Inf), in which case the problem is the evaluation of x log x or equivalent.

It seems we should change both the documentation and the result.

On Fri, 14 Jul 2006, goran.brostrom@gmail.com wrote:

> Full_Name: Göran Broström
> Version: 2.3.1
> OS: Linux, ubuntu
> Submission from: (NULL) (85.11.40.53)
>
>
> > dweibull(0, 0.5, 1)
> [1] NaN
> Warning message:
> NaNs produced in: dweibull(x, shape, scale, log)
>
> should give Inf (and no Warning). Compare with
>
> > dgamma(0, 0.5, 1)
> [1] Inf
>
> This happens when 'shape' < 1.
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
--27464147-852712393-1152995865=:29235--

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun Jul 16 07:02:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 16 Jul 2006 - 00:25:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.