# How to calculate a weighted mean with missing observations

**URL:** <https://discourse.julialang.org/t/how-to-calculate-a-weighted-mean-with-missing-observations/19281>\
**Category:** Statistics\
**Created:** [January 4, 2019, 8:01pm UTC](https://discourse.julialang.org/t/how-to-calculate-a-weighted-mean-with-missing-observations/19281 "2019-01-04T20:01:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [January 4, 2019, 8:52pm UTC](https://discourse.julialang.org/t/how-to-calculate-a-weighted-mean-with-missing-observations/19281/3 "2019-01-04T20:52:29Z")

</div>

This is a good solution.

However this is close to `na.rm = TRUE` in R, which `skipmissing` has taken pains to avoid.

I wonder if there is some room for a `skipmissing` function like  
`miss_x, miss_y = skipmissing(x, y)` that has the missing elements for both dropped?

---

_[View the full topic](https://discourse.julialang.org/t/how-to-calculate-a-weighted-mean-with-missing-observations/19281)._
