# Top coding logic

**URL:** <https://forum.ipums.org/t/top-coding-logic/6289>\
**Category:** USA\
**Created:** [January 17, 2025, 11:48pm UTC](https://forum.ipums.org/t/top-coding-logic/6289 "2025-01-17T23:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Dunlap](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@Ben\_Dunlap](https://forum.ipums.org/u/Ben_Dunlap)\
**Post date:** [January 17, 2025, 11:48pm UTC](https://forum.ipums.org/t/top-coding-logic/6289/1 "2025-01-17T23:48:01Z")

</div>

I am trying to understand top coding for the variable TRANTIME. It appears to be top coded at 158 minutes. I found on the IPUMS USA page ([https://usa.ipums.org/usa/volii/top\_bottom\_codes.shtml](https://usa.ipums.org/usa/volii/top_bottom_codes.shtml)) that:

“Age, travel time to work, and all base dollar amounts are top-coded using the state mean of all cases greater than or equal to the top-code state minimum value.”

I can’t seem to find a definition for “the top-code state minimum value”, which would help me understand what cases are used to calculate the mean.

Any ideas?

Thanks!

---

<div class="post-metadata">

**Author:** ![Ivan\_Strahof](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/ivan_strahof/32/626_2.png) [@Ivan\_Strahof](https://forum.ipums.org/u/Ivan_Strahof)\
**Post date:** [January 23, 2025, 5:25pm UTC](https://forum.ipums.org/t/top-coding-logic/6289/2 "2025-01-23T17:25:20Z")

</div>

Top-coding occurs in the ACS when a response to a particular question exceeds a certain threshold. For example, participants who report wage income above a certain threshold (e.g., $500,000) have their wage income top-coded by replacing the reported value with a different value. Top-codes for each variable are dynamic and vary by state and year. The maximum value that you see in the data (158 minutes) only refers to the top-code for a single state in a single year. Top-codes are typically applied to encompass the top 0.5% of values in each state for each year. The values that are selected for top-coding are replaced with the mean value of the cases selected for top-coding. If there were only two respondents who reported their wage income above the $500,000 threshold in the example above (e.g., $600,000 and $700,00), both of their wage incomes would be reported instead as $650,000.

The “top-code state minimum value” refers to the threshold value used for top-coding since it is the minimum value for which responses received a top-code. It can be found in the original PUMS .csv file [at the bottom of the page that you link to](https://usa.ipums.org/usa/volii/top_bottom_codes.shtml). The column titled **JWMNTPCT** reports the threshold value for [TRANTIME](https://usa.ipums.org/usa-action/variables/TRANTIME#description_section)while **T\_JWMN** reports the value that top-coded responses to TRANTIME were assigned.
