The Household sample provides an example of a complex hierarchical data set. Unlike the Museum and Short Drinks samples, which are based on real surveys, the Household sample has been created artificially to demonstrate hierarchical data. The Household sample is a small data set that includes a very small number of cases at each level. This is to illustrate what happens when you generate your tables at different levels.
Two versions of the Household sample are available--a IBM® SPSS® Quanvert™ database and an XML data set. The two versions are slightly different and in this documentation we will be using the XML version. By default, the Household XML survey data is installed with the IBM® SPSS® Data Collection Developer Library in [INSTALL_FOLDER]\IBM\SPSS\DataCollection\6\DDL\Data\XML.
The Household sample represents the data collected using the following fictitious survey:
• Household questions. Respondents are first asked a number of questions about their household as a whole, such as the address, age of the building, and number of rooms.
• Person questions. Respondents are then asked a number of questions about each person in the household, such as the person's name, age, gender, and occupation, and a grid question that asks the number of days he or she watches various TV channels.
• Overseas trip questions. Respondents are also asked a number of questions about each overseas trip that each person in their household has taken in the previous year (if any), such as the purpose of the trip, number of days he or she was away from home, and countries that were visited.
• Vehicle questions. Finally, respondents are asked a number of questions about each vehicle that belongs to their household, such as the vehicle's type, color, and annual mileage, and a grid question that asks the respondent to rate the vehicle's features.
Loops called person, trip, and vehicle are used to ask the person, overseas trip, and vehicle questions, respectively. The person loop is an expanded loop that was iterated once (and therefore the questions were asked once) for each person in the household up to a maximum of six people. The other loops are unbounded loops that were iterated (and therefore the questions were asked) as many times as necessary. For example, in a household with three vehicles, the vehicle loop will be iterated three times, whereas in a single-vehicle household it will be iterated once. In a household that has no cars, bikes, or other vehicles, the vehicle questions will not be asked at all and the vehicle loop will have no iterations. Click below to see a diagram that lists the variables.
The structure of the levels corresponds to the structure of the loops. This means that because the trip loop is nested within the person loop, the trip level is a child of the person level. The two grids, tvdays and rating, are also represented in the case data as levels, each nested within its parent level. Click below to see a diagram that shows the relationship of the levels.