Hi to all,> dlogis(-2000)[1] NaN Warning message: NaNs produced in: dlogis(x, location, scale, log)> dnorm(-2000)[1] 0 Is this an expected behaviour of `dlogis()'? Thanks in advance for any comments, Dimitris platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 9.1 year 2004 month 06 day 21 language R ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/396887 Fax: +32/16/337015 Web: med.kuleuven.ac.be/biostat student.kuleuven.ac.be/~m0390867/dimitris.htm
On Wed, 6 Oct 2004, Dimitris Rizopoulos wrote:> Hi to all, > > > dlogis(-2000) > [1] NaN > Warning message: > NaNs produced in: dlogis(x, location, scale, log) > > dnorm(-2000) > [1] 0 > > > Is this an expected behaviour of `dlogis()'?No, it's a poor algorithm. See dlogis.c x = (x - location) / scale; e = exp(-x); f = 1.0 + e; return give_log ? -(x + log(scale * f * f)) : e / (scale * f * f); That needs to be x = fabs((x - location) / scale); -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, 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
Apparently Analagous Threads
- 答复: Multiple formula in one block
- Follow-up Q Re: displaying computation outputs inside "for" loops
- New Package 'JM' for the Joint Modelling of Longitudinal and Survival Data
- New Package 'JM' for the Joint Modelling of Longitudinal and Survival Data
- problem with the ltm package - 3PL model