Skip to content
Prev 388531 / 398513 Next

density with weights missing values

Weighted mean behaves differently:
? weight is excluded for missing x
? no warning for sum(weights) != 1
[1] 2.5
[1] NA
[1] 2




Von: Richard O'Keefe
Gesendet: Montag, 12. Juli 2021 13:18
An: Matthias Gondan
Betreff: Re: [R] density with weights missing values

Does your copy of R say that the weights must add up to 1?
?density doesn't say that in mine.   But it does check.
On Mon, 12 Jul 2021 at 22:42, Matthias Gondan <matthias-gondan at gmx.de> wrote: