Desktop User Guides > Reporter > Tabulating hierarchical data > The Household sample
The Household sample
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 Quanvert database and an XML data set. The two versions are slightly different; this documentation uses the XML version. By default, the Household XML survey data is installed with the UNICOM Intelligence Developer Documentation Library in:
The Household sample represents the data collected using the following fictitious survey:
Household questions. Respondents are first asked about their household as a whole, such as the address, age of the building, and number of rooms.
Person questions. Respondents are then asked about each person in the household, such as their name, age, gender, and occupation, and a grid question that asks the number of days that they watch various TV channels.
Overseas trip questions. Respondents are also asked 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 that they were away from home, and countries that were visited.
Vehicle questions. Finally, respondents are asked about each vehicle that belongs to their household, such as its type, color, and annual mileage, and a grid question that asks the respondent to rate the vehicle's features.
Flowchart of questionnaire logic
This graphic is described in the surrounding text.
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.
Diagram of variables
This graphic is described in the surrounding text.
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.
Structure of levels
This graphic is described in the surrounding text.
See also
Tabulating hierarchical data