Displaying 1 result from an estimated 1 matches for "4d3468ef".
2011 Jan 17
1
median by geometric mean -- are we missing what's important?
...)
> exp(median(log(pmax(0,x))))
>
> It'll give -Inf if the two middle values are negative, when I guess we
> should get NaN, but I can't see a 1-line way to handle that!
>
> Keith J
>
> "Peter Ehlers" <ehlers at ucalgary.ca> wrote in message
> news:4D3468EF.5010601 at ucalgary.ca...
>> I've been reminded by Prof. Brian Ripley that R's
>> log() function will indeed handle zeros appropriately.
>>
>> Apologies to S Ellison and Hadley Wickham.
>>
>> Peter Ehlers
>>
>> On 2011-01-17 06:55, Peter Ehler...