# Calculating group medians in R (ACS 5yr 2018-2022)

**URL:** <https://forum.ipums.org/t/calculating-group-medians-in-r-acs-5yr-2018-2022/6016>\
**Category:** USA\
**Created:** [July 24, 2024, 11:44pm UTC](https://forum.ipums.org/t/calculating-group-medians-in-r-acs-5yr-2018-2022/6016 "2024-07-24T23:44:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Benjamin\_Albrecht](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/benjamin_albrecht/32/988_2.png) [@Benjamin\_Albrecht](https://forum.ipums.org/u/Benjamin_Albrecht)\
**Post date:** [July 25, 2024, 3:25pm UTC](https://forum.ipums.org/t/calculating-group-medians-in-r-acs-5yr-2018-2022/6016/3 "2024-07-25T15:25:45Z")

</div>

Apologies, I should have mentioned that my extract request was filtered on California data with the “select cases” option.

I found some additional instructions working with household level data from an earlier thread:

> [@Matching ACS median household income?](https://forum.ipums.org/t/matching-acs-median-household-income/2099):
>
> Hi guys, I can’t come close to replicating median household income (computed on full ACS microdata) using the ACS IPUMS sample. Using ACS IPUMs data, I find median household income of about $66,000 in 2015, whereas other sources using the ACS full microdata report that this number should be much lower, about $57,000. I am pretty sure that I am using the right weights (in fact, any weighting choice won’t close the gap). Restricting to non-group quarters, etc. don’t significantly affect this disc…

As they suggest, I changed my filter to exclude group quarters:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/ipums/original/1X/fac8303e933b43ad292cdc372d086dc520b9ef4b.png)

However, I noticed the variable PERNUM is missing despite specifying it in my extract. Are there other variables one should consider with household level analysis?

---

_[View the full topic](https://forum.ipums.org/t/calculating-group-medians-in-r-acs-5yr-2018-2022/6016)._
