P.Mean: Undeclared missing code leads to bad results (created 2008-07-15)
This page is moving to a new website.
I found this ticket in a computer store many years ago and am just now getting around to showing it. It demonstrates how failure to declare a missing value code can lead to laughably incorrect results.
Notice how the list price of $9999.99, clearly a missing value code, was compared to the current price of $299.99 to produce a ridiculously large inferred savings.
I encourage my clients to use extreme values to represent missing codes. You want the missing code to stand out like a sore thumb, so it will not be used in any inappropriate calculations. Usually 9, 99, or 999 will work. Sometimes a negative value like -1 will work as well. A baby with a birthweight of -1 would float to the ceiling after it was born. A mother's age at the time of the birth of her child could also note obviously be -1. That's the ultimate in babies having babies.
This work is licensed under a Creative Commons Attribution 3.0 United States License. This page was written by Steve Simon and was last modified on 2010-04-01. Need more information? I have a page with general help resources. You can also browse for pages similar to this one at Category: Data management.