When using unedited variables as parameters of your DeckArray, it may be useful to include a "leftover" (spillover) row for cases in which the variable is not valid. This functionality allows the user to simulate the use of many hotdecks using a single array. An example will best explain this functionality.
This following is a hotdeck for housing type, based on the source of drinking water (H8), the type of toilet (H9), and whether or not the household has electricity (H10).
At the point that housing type, H6, is edited, none of the dependent variables in the hotdeck have been edited, so the values can be blank or invalid. That is why, in the array definition, a (+) has been added after the value set names. The (+) gives an extra row for any value that is not in the value set.
When updating the hotdeck in cases where the housing type value is valid, adding a (+) after the DeckArray name will update the "leftover" rows.
This means that when the hotdeck is called upon for an edit or imputation, having valid values for H8, H9, or H10 is not necessary to return a valid H6 value. This fundamentally makes the housing type DeckArray eight hotdecks combined into one. The table below explains what happens when executing a getdeck function call:
H8 |
H9 |
H10 |
Take the H6 value from the nearest neighbor with the same values for... |
Valid |
Valid |
Valid |
H8, H9, and H10 |
Valid |
Valid |
Invalid |
H8 and H9 |
Valid |
Invalid |
Valid |
H8 and H10 |
Valid |
Invalid |
Invalid |
H8 only |
Invalid |
Valid |
Valid |
H9 and H10 |
Invalid |
Valid |
Invalid |
H9 only |
Invalid |
Invalid |
Valid |
H10 only |
Invalid |
Invalid |
Invalid |
The previous valid household's value |
Or in words:
If electricity is blank, use a hotdeck based on water and toilet.
If electricity and water are blank, use a hotdeck based on toilet.
If water is blank, use a hotdeck based on electricity and toilet.
If all three are blank, use a hotdeck based on the previous valid household.
Etc.
See also: DeckArrays, Getdeck Function, Putdeck Function